Boolean Expression Simplifier
Simplify Boolean expressions into equivalent minimized logic. Enter an expression using AND, OR, NOT, XOR, XNOR, NAND or NOR and generate simplified Sum of Products and Product of Sums forms using exact truth-table based Boolean minimization.
—
—
—
—
—
Boolean Expression Simplifier
The Boolean Expression Simplifier reduces a logic expression to a logically equivalent expression with fewer terms or literals where possible. It supports common Boolean operators including AND, OR, NOT, XOR, XNOR, NAND and NOR.
The calculator evaluates the original expression over its complete truth table and then minimizes the resulting Boolean function. This means the simplification is based on the function’s actual outputs rather than on a small collection of text-replacement rules.
The tool generates both a minimized Sum of Products form and a minimized Product of Sums form, allowing you to compare two standard implementations of the same logic function.
How to Simplify a Boolean Expression
Enter the expression using variables such as A, B and C. Parentheses can be used to control grouping. Press Simplify Boolean Expression to calculate the complete Boolean function and minimize it.
Original:
(A AND B) OR (A AND NOT B)
Factor A:
A AND (B OR NOT B)
B OR NOT B:
TRUE
Simplified:
AThe calculator reaches the same result by exact truth-table minimization.
Boolean Simplification Example: Absorption Law
Expression:
A OR (A AND B)
Absorption law:
A OR (A AND B) = A
Simplified:
AThe term A AND B cannot make the expression true in any case where A is not already true, so it is redundant.
Boolean Simplification with Complements
A variable OR its complement is always true, while a variable AND its complement is always false.
A OR NOT A
= TRUE
A AND NOT A
= FALSEThese identities are known as the complement laws of Boolean algebra.
Boolean Simplification Laws
| Law | Expression | Simplified |
|---|---|---|
| Identity | A AND TRUE | A |
| Identity | A OR FALSE | A |
| Null | A OR TRUE | TRUE |
| Null | A AND FALSE | FALSE |
| Idempotent | A OR A | A |
| Idempotent | A AND A | A |
| Complement | A OR NOT A | TRUE |
| Complement | A AND NOT A | FALSE |
| Absorption | A OR (A AND B) | A |
What Is Sum of Products?
Sum of Products, usually abbreviated SOP, is a Boolean form consisting of AND terms joined together using OR.
Example SOP:
(A AND B)
OR
(NOT A AND C)
Written together:
(A AND B) OR (NOT A AND C)Each AND group is called a product term, while OR represents the logical sum.
What Is Product of Sums?
Product of Sums, or POS, consists of OR clauses combined with AND.
Example POS:
(A OR B)
AND
(NOT A OR C)
Combined:
(A OR B) AND (NOT A OR C)Depending on the Boolean function, POS may require fewer literals than SOP or vice versa.
SOP vs POS Simplification
Minimal SOP is derived from rows where the function is true. Minimal POS is derived from rows where the function is false.
| Form | Built From | Outer Operator |
|---|---|---|
| SOP | Minterms / true rows | OR |
| POS | Maxterms / false rows | AND |
Minterms in Boolean Simplification
A minterm identifies a truth-table row where the Boolean function equals true. For three variables, each row corresponds to a binary index from 0 through 7.
A B C
-----
0 0 0 → m0
0 0 1 → m1
0 1 0 → m2
0 1 1 → m3
1 0 0 → m4
1 0 1 → m5
1 1 0 → m6
1 1 1 → m7Maxterms in Boolean Simplification
Maxterms identify the truth-table rows where the function equals false. They are useful when constructing and minimizing Product of Sums expressions.
If F is false at rows:
0, 2, 5
Then the maxterm index set is:
M(0,2,5)Simplifying XOR Expressions
The parser accepts XOR and XNOR directly. During minimization, the resulting Boolean function is converted to standard AND, OR and NOT terms.
Input:
A XOR B
Equivalent minimal SOP:
(NOT A AND B)
OR
(A AND NOT B)
Equivalent minimal POS:
(A OR B)
AND
(NOT A OR NOT B)The simplified two-level output intentionally uses standard SOP/POS operators rather than retaining XOR as a special gate.
Simplifying NAND and NOR Expressions
NAND and NOR expressions can also be entered directly. Their truth functions are evaluated before minimization.
A NAND B
means:
NOT (A AND B)
Equivalent SOP:
NOT A OR NOT BDe Morgan’s Laws
De Morgan’s laws are particularly useful when converting between AND and OR structures involving complements.
NOT (A AND B)
=
NOT A OR NOT B
NOT (A OR B)
=
NOT A AND NOT BThese identities explain why NAND and NOR expressions can often be rewritten into compact SOP or POS forms.
Simplifying Redundant Terms
A term is redundant when removing it does not change the function’s truth table.
Expression:
(A AND B)
OR
(A AND NOT B)
OR
(A AND B AND C)
The first two terms already simplify to A.
Therefore:
A OR (A AND B AND C)
= ATautology Detection
If the expression evaluates to true for every possible assignment, the function is a tautology and its simplest form is TRUE.
Expression:
A OR NOT A
Truth-table output:
TRUE for every row
Simplified:
TRUEContradiction Detection
If every truth-table row evaluates to false, the expression is a contradiction and simplifies to FALSE.
Expression:
A AND NOT A
Every row:
FALSE
Simplified:
FALSEWhy Truth-Table Based Simplification Is Useful
Symbolic Boolean laws can simplify expressions efficiently, but a rule-based text system must recognize many different algebraic patterns. Truth-table minimization instead determines the complete logical function first.
Expressions that look very different but produce identical truth tables therefore lead to the same minimized Boolean function.
Boolean Simplification for Digital Logic
Reducing a Boolean function can reduce the number of gates or gate inputs needed in a digital circuit.
Original:
(A AND B)
OR
(A AND NOT B)
Possible implementation:
2 AND gates
1 NOT gate
1 OR gate
Simplified:
A
Possible implementation:
direct signalActual hardware optimization can depend on gate technology, delay, fan-out and available primitives, but algebraic simplification is a useful starting point.
Boolean Simplification in Programming
Simplified Boolean conditions can also make program logic easier to read and maintain.
Original condition:
(A && B) || (A && !B)
Equivalent condition:
ABefore simplifying production code, developers should also consider side effects and language-specific short-circuit behavior. Pure Boolean algebra assumes operands themselves have no side effects.
Common Boolean Simplification Mistakes
One common mistake is applying arithmetic algebra rules directly to Boolean expressions. Boolean variables have only two possible states and follow Boolean identities rather than ordinary numeric algebra.
Another mistake is confusing XOR with OR. A OR B is true when both are true, while A XOR B is false in that case.
Parentheses also matter. A OR (B AND C) is not generally equivalent to (A OR B) AND C.
Boolean Expression Simplifier Limitations and Notes
This tool supports up to six distinct single-letter variables. Six variables create 64 truth-table rows, which remains practical for exact browser-based minimization.
The minimized result is a two-level SOP or POS expression. It does not attempt arbitrary multi-level circuit factoring, gate-delay optimization or technology-specific NAND-only or NOR-only optimization.
XOR, XNOR, NAND and NOR are accepted in the input, but the minimized SOP and POS results are expressed using AND, OR and NOT so the output follows standard Boolean minimization forms.