Boolean Simplifier
Type any Boolean expression and rewrite it one law at a time, with hints on or off. Then practise naming the law behind a rewrite — the part an exam actually asks for.
Rewrite an expression one law at a time, with hints on or off.
AB + AB' + A'BCards that apply are highlighted for you.
Each highlighted card has an Apply button - click it to rewrite the expression above. Faded cards do not match yet.
X'' = XX · X = XX + X = XX · 1 = XX + 0 = XX · 0 = 0X + 1 = 1X · X' = 0X + X' = 1(X · Y)' = X' + Y'(X + Y)' = X' · Y'X · (X + Y) = XX + (X · Y) = XA·(B + C) → A·B + A·CA·B + A·C → A·(B + C)A + B·C → (A + B)·(A + C)(A + B)·(A + C) → A + B·CX + X'·Y = X + YX · (X' + Y) = X · YX·Y + X·Y' = X(X + Y)·(X + Y') = XX·Y + X'·Z + Y·Z = X·Y + X'·Z(X+Y)·(X'+Z)·(Y+Z) = (X+Y)·(X'+Z)Commutative and associative always apply and never simplify - they reorder or regroup terms. Listed separately so they do not crowd out the laws that make progress.
X · Y = Y · XX + Y = Y + X(X · Y) · Z = X · (Y · Z)(X + Y) + Z = X + (Y + Z)B + AWhich law was applied?
0 / 0 correct
Boolean algebra simplification
Boolean simplification reduces a logic expression to fewer terms and literals, which maps directly to fewer gates — lower cost, lower power, and less propagation delay in the final circuit.
Algebraic vs graphical methods
Boolean algebra manipulations work for any number of variables but require insight to apply in the right order. K-maps and the Quine–McCluskey algorithm (both available in this toolkit) are systematic and guaranteed to find the minimum SOP/POS form.
Learn more → Boolean Algebra — Learn
Every law, with its dual
The 27 laws this tool can apply, each shown with its dual — swap every AND for an OR and every 0 for a 1 and you get the twin law. Worked examples are generated by running the law itself, so they always match.
Involution
Two inversions cancel. The basis of bubble-pushing in gate diagrams.
X'' = Xe.g. A'' → AIdempotence
Combining a signal with itself changes nothing — duplicated inputs are wasted gates.
X + X = Xe.g. A + A → AX · X = Xe.g. AA → AIdentity
0 for OR and 1 for AND leave the other input untouched.
X + 0 = Xe.g. A + 0 → AX · 1 = Xe.g. A1 → ANull (annihilator)
1 forces an OR high and 0 forces an AND low, whatever the other input does.
X + 1 = 1e.g. A + 1 → 1X · 0 = 0e.g. A0 → 0Complement
A variable and its inverse cover every case — the law that removes variables.
X + X' = 1e.g. A + A' → 1X · X' = 0e.g. AA' → 0Commutative
Order does not matter. Always available, never simplifies.
X + Y = Y + Xe.g. A + B → B + AX · Y = Y · Xe.g. AB → BAAssociative
Grouping does not matter, which is why a 3-input gate equals two 2-input gates.
(X + Y) + Z = X + (Y + Z)e.g. (A + B) + C → A + (B + C)(X · Y) · Z = X · (Y · Z)e.g. (AB)C → A(BC)Distributive
Multiply out or factor common terms — the usual way into and out of SOP form.
A·(B + C) → A·B + A·Ce.g. A(B + C) → AB + ACA·B + A·C → A·(B + C)e.g. AB + AC → A(B + C)Distributive (OR over AND)
The dual, and the one that surprises people: it has no arithmetic equivalent.
A + B·C → (A + B)·(A + C)e.g. A + BC → (A + B)(A + C)(A + B)·(A + C) → A + B·Ce.g. (A + B)(A + C) → A + BCDe Morgan's laws
Push an inversion inward and the operator flips. How AND-OR logic becomes all-NAND.
(X · Y)' = X' + Y'e.g. (AB)' → A' + B'(X + Y)' = X' · Y'e.g. (A + B)' → A'B'Absorption
The longer term adds no coverage and disappears entirely.
X + (X · Y) = Xe.g. A + AB → AX · (X + Y) = Xe.g. A(A + B) → ARedundancy (second absorption)
The shared factor is complemented, so the term shrinks instead of vanishing. Do not confuse this with absorption.
X + X'·Y = X + Ye.g. A + A'B → A + BX · (X' + Y) = X · Ye.g. A(A' + B) → ABAdjacency (combining)
Two terms differing in one complemented literal merge — the algebra behind joining K-map cells.
X·Y + X·Y' = Xe.g. AB + AB' → A(X + Y)·(X + Y') = Xe.g. (A + B)(A + B') → AConsensus
The third term is already covered by the other two and can be dropped.
X·Y + X'·Z + Y·Z = X·Y + X'·Ze.g. AB + A'C + BC → AB + A'C(X+Y)·(X'+Z)·(Y+Z) = (X+Y)·(X'+Z)e.g. (A + B)(A' + C)(B + C) → (A + B)(A' + C)Quick experiments
- Watch a variable vanish. Enter A·B + A·B'. B appears once true and once false, so it cannot affect the result — the tool reduces the whole thing to A. Two gates become a wire.
- Try the absorption law. Enter A + A·B. The answer is just A: whenever A is true the sum is true regardless of B, and whenever A is false both terms are false.
- Apply De Morgan by hand, then check. Enter (A·B)'. Expect A' + B'. Then try (A + B)' and expect A'·B'. The AND/OR swap under a shared inversion is the rule that makes all-NAND designs possible.
- Compare SOP against POS gate counts. Enter a function with only two 1s in its truth table. The SOP form is compact while POS needs six sum terms. With mostly 1s the situation reverses — always cost both.
- Let a don't-care do the work. Mark an unreachable input combination as a don't-care. The tool folds it into a neighbouring group and drops a variable that would otherwise have to be gated.
Formula reference
- Complement (the law that removes variables)
The basis of every simplification: a variable and its inverse cover everything.
- Absorption
The second term adds no new coverage.
- De Morgan's laws
How AND-OR logic converts to all-NAND or all-NOR.
- Distribution
Used to expand into SOP before grouping.
| Symbol | Meaning | Unit |
|---|---|---|
| NOT A (complement) | — | |
| A AND B | — | |
| A OR B | — |
Common mistakes
Reading + as ordinary addition.
In Boolean algebra + means OR, so 1 + 1 = 1, not 2. Every value is 0 or 1 and there is no carry.
Distributing De Morgan without swapping the operator.
(A·B)' is A' + B', not A'·B'. The inversion moves inward and the operator must flip with it — forgetting the flip is the most common source of a wrong inverted circuit.
Stopping at the first simplification found.
A shorter expression may still exist. Keep applying absorption and complement until no term can be reduced, or use a K-map, which finds the minimum systematically.
Assuming the minimal expression is the fastest circuit.
Minimal gate count can mean more logic levels, and each level adds delay. It can also introduce static hazards, so a deliberately redundant term is sometimes the better design.
Treating don't-cares as zeros by default.
A don't-care may be either value. Forcing it to 0 throws away the freedom that often removes an entire variable from the result.
Frequently asked questions
What is the consensus theorem in Boolean algebra?
The consensus theorem says XY + X'Z + YZ equals XY + X'Z. The third term is already covered by the other two whenever it is true, so it is redundant and can be removed without changing the function.
What is the difference between absorption and redundancy?
Absorption is X + XY = X, where the longer term disappears completely. Redundancy, sometimes called the second absorption law, is X + X'Y = X + Y: the shared factor is complemented, so the term only shrinks. Students often apply absorption here and delete too much.
Why simplify a Boolean expression?
A simpler expression needs fewer logic gates, which means lower cost, less board area, lower power draw and shorter propagation delay. It also reduces the number of inputs that can glitch, so the circuit is easier to make hazard-free.
What is the difference between SOP and POS form?
Sum of Products is an OR of AND terms, such as AB + CD. Product of Sums is an AND of OR terms, such as (A + B)(C + D). SOP maps directly onto AND-OR or NAND-NAND gate structures, while POS maps onto OR-AND or NOR-NOR structures.
What are De Morgan's laws?
De Morgan's laws state that NOT (A AND B) equals NOT A OR NOT B, and NOT (A OR B) equals NOT A AND NOT B. They let you push inversions through gates, which is how AND-OR logic gets converted into all-NAND or all-NOR implementations.
What is a don't-care condition?
A don't-care is an input combination that can never occur, or whose output nobody cares about. You are free to treat it as 0 or 1, whichever makes the grouping larger, so don't-cares often produce a noticeably simpler final expression.
Related tools
SOP / POS Builder & K-Map Solver
Truth table + K-map of the same function — canonical Σm/ΠM above, minimum SOP/POS below.
Open →Quine–McCluskey Reducer
Tabular minimisation — iteration columns, PI chart, and minimum SOP.
Open →Universal Gate Builder
Build NOT / AND / OR / XOR / XNOR from NAND-only or NOR-only gates.
Open →Adder & Subtractor
Half / full adder up to 4-bit signed add-subtract with overflow flag.
Open →Combinational Blocks
4:1 MUX, 2-to-4 decoder, and 4-bit comparator — toggle between blocks.
Open →Static Hazard Analyzer
Watch a static-1 glitch on F = AB + A'C — add the consensus cover to kill it.
Open →Browse the full circuit toolkit or start a guided lesson in topics.