Boolean Expression Solver - Evaluate & Solve Boolean Equations

Boolean Expression Solver

Evaluate, classify, and find every solution

Operators: AND/*, OR/+, NOT/', XOR/^, NAND, NOR, XNOR, implies (->) and equivalence (<->). Single letters are variables; use 0/1 for constants.

Try an example

CLASSIFICATION

Satisfiable

A contingency — true for some inputs, false for others.

TRUE for 3 of 8 input combinations (3 variables).

Evaluate a single assignment

Tap each variable to flip it between 0 and 1, then watch the expression resolve.

Result: TRUE (1)

Solution distribution

38%
63%
TRUE: 3 FALSE: 5

Truth table

Every input combination and the resulting output. Rows where the expression is TRUE (the solutions) are shaded.

ABCOutput
0000
0010
0100
0110
1000
1011
1101
1111

Satisfying assignments (the solutions)

Every combination of inputs that makes the expression TRUE.

A=1, B=0, C=1A=1, B=1, C=0A=1, B=1, C=1

How to Use This Calculator

  1. Type your expression in the Boolean expression box, or tap an example chip. Use word operators (AND, NAND) or symbols (*, +, ') — whichever you prefer.
  2. Read the Classification card to learn instantly whether the expression is a tautology, a contradiction, or satisfiable.
  3. In Evaluate a single assignment, tap each variable to set it to 0 or 1 and watch the result switch between TRUE and FALSE.
  4. Scan the Truth table — shaded rows are solutions — and the Satisfying assignments list to see every input that makes the expression true.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Boolean Expression Solver: How to Evaluate and Solve Boolean Equations

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Boolean Expression Solver evaluating a logic equation and highlighting every satisfying assignment in a color-coded truth table

A Boolean expression solver takes a logic equation like A AND (B OR C) and answers the two questions that actually matter: what does it evaluate to for a given set of inputs, and which inputs make it true? The calculator above does both at once — flip any variable on or off and the result lights up instantly, while the truth table lists every combination that satisfies the equation. That's the difference between solving and simplifying, and it's worth being clear about up front.

What a Boolean Expression Solver Does: Solving vs. Simplifying

People use "solve" loosely, so here's the distinction. Solving a Boolean expression means finding the truth value — either for one specific assignment (plug in A=1, B=0, C=1 and read the answer) or for all of them at once (the full truth table). Simplifying means rewriting the expression in a shorter equivalent form, like reducing A·B + A·B' to just A. This page solves. If your goal is a minimal form or a Karnaugh map, the Boolean algebra simplifier is the better tool. Most homework problems and circuit-verification tasks need solving, not simplifying.

Solving an expression with n variables means checking all 2n input combinations. Three variables give 8 rows, four give 16, five give 32. The solver builds that table for you and flags every row where the output is 1. Doing it by hand is mechanical but error-prone — one flipped bit and your whole answer is wrong.

Every Expression Lands in One of Three Buckets

Once you have the full truth table, classifying the expression is automatic. There are only three possibilities, and the solver labels which one you've got:

TypeTruth table looks likeExample
TautologyOutput is 1 in every rowA + A'
ContradictionOutput is 0 in every rowA · A'
Satisfiable (contingency)A mix of 1s and 0sA AND (B OR C)

A tautology is always true, no matter what — A + A' is true because a variable and its negation can't both be false. A contradiction is the mirror image: A · A' can never be true because A can't be both 1 and 0 at the same time. Everything else is satisfiable — true for at least one input but not all. This trichotomy is the backbone of formal logic and the SAT problem at the heart of computer science.

Solving A AND (B OR C) Step by Step

Let's solve the default expression by hand so you can see what the calculator does internally. With three variables there are 2³ = 8 rows. The expression is true only when A is 1 and at least one of B or C is 1.

ABCB OR CA AND (B OR C)
00000
00110
01110
10111
11011
11111

I trimmed the two A=1, B=0, C=0 style rows for space, but the pattern is clear: the expression is true in exactly three of the eight rows. Those three are your satisfying assignments. Notice the rows where A=0 are all false regardless of B and C — that's the AND doing its job, since one false operand sinks the whole product. The solver shades these solution rows green so they jump out, and lists them as compact chips below the table.

The Six Operators and Their Truth Values

Solving correctly hinges on knowing what each operator does for two inputs. Here's the complete reference for the binary operators this solver supports — memorize the NAND and NOR rows especially, since they trip people up:

ABANDORXORNANDNORXNOR
00000111
01011100
10011100
11110001

NAND is just "not AND" — it's false only when both inputs are 1. NOR is "not OR" — true only when both inputs are 0. XOR is true when the inputs differ; XNOR (equivalence) is true when they match. If you only need the table for these operators without the classification layer, the truth table calculator generates it directly. Operator precedence matters too: NOT binds tightest, then AND, then OR, so A OR B AND C means A OR (B AND C). When in doubt, add parentheses.

Mistakes That Produce Wrong Solutions

  • Reading precedence wrong. A OR B AND C is not (A OR B) AND C. AND outranks OR, so the AND happens first. This single misreading flips half the truth table.
  • Confusing XOR with OR. Plain OR is true when at least one input is 1, including both. XOR is false when both are 1. The rows only differ on the all-ones case, which is exactly the row people forget to check.
  • Treating NAND as "NOT then AND." NAND negates the whole AND, not each input. A NAND B equals (A AND B)', which by De Morgan's law is A' OR B' — not A' AND B'.
  • Stopping after one satisfying assignment. Finding one input that works doesn't mean you're done. The question "is this satisfiable" needs one solution; the question "find all solutions" needs the full table.
  • Forgetting that implication is sneaky. A -> B is true whenever A is false, even if B is false too. A false premise implies anything.

Where Solving Boolean Equations Actually Shows Up

This isn't just textbook material. Every if statement you write is a Boolean expression that the CPU solves at runtime; a bug where a condition is "always true" is literally an accidental tautology. Database query optimizers evaluate WHERE clauses the same way. Digital circuit designers check whether two gate networks compute the identical function by confirming the XNOR of their outputs is a tautology. And the general question — "is there any assignment that makes this giant expression true?" — is the Boolean satisfiability problem, the first problem ever proven NP-complete. For the broader logic toolkit behind all of this, the logic calculator evaluates statements operator by operator, and the formal grounding lives in the Wikipedia article on Boolean satisfiability. Whenever you need to know not just whether an expression can be true but exactly which inputs make it true, solving — not simplifying — is the job.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.