← Circuit Toolkit

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.

Current expression
AB + AB' + A'B
Guided — matching laws highlighted

Cards that apply are highlighted for you.

Laws and theorems

Each highlighted card has an Apply button - click it to rewrite the expression above. Faded cards do not match yet.

Double negation
X'' = X
Idempotence (·)
X · X = X
Idempotence (+)
X + X = X
Identity (·1)
X · 1 = X
Identity (+0)
X + 0 = X
Annihilator (·0)
X · 0 = 0
Annihilator (+1)
X + 1 = 1
Complement (·)
X · X' = 0
Complement (+)
X + X' = 1
DeMorgan (· over +)
(X · Y)' = X' + Y'
DeMorgan (+ over ·)
(X + Y)' = X' · Y'
Absorption (·)
X · (X + Y) = X
Absorption (+)
X + (X · Y) = X
Distribute (expand)
A·(B + C) → A·B + A·C
Distribute (factor)
A·B + A·C → A·(B + C)
Distribute (OR over AND)
A + B·C → (A + B)·(A + C)
Distribute (factor OR)
(A + B)·(A + C) → A + B·C
Redundancy (+)
X + X'·Y = X + Y
Redundancy (·)
X · (X' + Y) = X · Y
Adjacency (+)
X·Y + X·Y' = X
Adjacency (·)
(X + Y)·(X + Y') = X
Consensus (+)
X·Y + X'·Z + Y·Z = X·Y + X'·Z
Consensus (·)
(X+Y)·(X'+Z)·(Y+Z) = (X+Y)·(X'+Z)
Rearranging laws

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.

Commutative (·)
X · Y = Y · X
Commutative (+)
X + Y = Y + X
Associative (·)
(X · Y) · Z = X · (Y · Z)
Associative (+)
(X + Y) + Z = X + (Y + Z)
Quine–McCluskey minimum SOP
B + A

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.

Double negation
X'' = Xe.g. A'' → A

Idempotence

Combining a signal with itself changes nothing — duplicated inputs are wasted gates.

Idempotence (+)
X + X = Xe.g. A + A → A
Idempotence (·)
X · X = Xe.g. AA → A

Identity

0 for OR and 1 for AND leave the other input untouched.

Identity (+0)
X + 0 = Xe.g. A + 0 → A
Identity (·1)
X · 1 = Xe.g. A1 → A

Null (annihilator)

1 forces an OR high and 0 forces an AND low, whatever the other input does.

Annihilator (+1)
X + 1 = 1e.g. A + 1 → 1
Annihilator (·0)
X · 0 = 0e.g. A0 → 0

Complement

A variable and its inverse cover every case — the law that removes variables.

Complement (+)
X + X' = 1e.g. A + A' → 1
Complement (·)
X · X' = 0e.g. AA' → 0

Commutative

Order does not matter. Always available, never simplifies.

Commutative (+)
X + Y = Y + Xe.g. A + B → B + A
Commutative (·)
X · Y = Y · Xe.g. AB → BA

Associative

Grouping does not matter, which is why a 3-input gate equals two 2-input gates.

Associative (+)
(X + Y) + Z = X + (Y + Z)e.g. (A + B) + C → A + (B + C)
Associative (·)
(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.

Distribute (expand)
A·(B + C) → A·B + A·Ce.g. A(B + C) → AB + AC
Distribute (factor)
A·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.

Distribute (OR over AND)
A + B·C → (A + B)·(A + C)e.g. A + BC → (A + B)(A + C)
Distribute (factor OR)
(A + B)·(A + C) → A + B·Ce.g. (A + B)(A + C) → A + BC

De Morgan's laws

Push an inversion inward and the operator flips. How AND-OR logic becomes all-NAND.

DeMorgan (· over +)
(X · Y)' = X' + Y'e.g. (AB)' → A' + B'
DeMorgan (+ over ·)
(X + Y)' = X' · Y'e.g. (A + B)' → A'B'

Absorption

The longer term adds no coverage and disappears entirely.

Absorption (+)
X + (X · Y) = Xe.g. A + AB → A
Absorption (·)
X · (X + Y) = Xe.g. A(A + B) → A

Redundancy (second absorption)

The shared factor is complemented, so the term shrinks instead of vanishing. Do not confuse this with absorption.

Redundancy (+)
X + X'·Y = X + Ye.g. A + A'B → A + B
Redundancy (·)
X · (X' + Y) = X · Ye.g. A(A' + B) → AB

Adjacency (combining)

Two terms differing in one complemented literal merge — the algebra behind joining K-map cells.

Adjacency (+)
X·Y + X·Y' = Xe.g. AB + AB' → A
Adjacency (·)
(X + Y)·(X + Y') = Xe.g. (A + B)(A + B') → A

Consensus

The third term is already covered by the other two and can be dropped.

Consensus (+)
X·Y + X'·Z + Y·Z = X·Y + X'·Ze.g. AB + A'C + BC → AB + A'C
Consensus (·)
(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)
A+Aˉ=1AAˉ=0A + \bar{A} = 1 \qquad A \cdot \bar{A} = 0

The basis of every simplification: a variable and its inverse cover everything.

Absorption
A+AB=AA(A+B)=AA + A B = A \qquad A(A + B) = A

The second term adds no new coverage.

De Morgan's laws
AB=Aˉ+BˉA+B=AˉBˉ\overline{A \cdot B} = \bar{A} + \bar{B} \qquad \overline{A + B} = \bar{A} \cdot \bar{B}

How AND-OR logic converts to all-NAND or all-NOR.

Distribution
A(B+C)=AB+ACA(B + C) = AB + AC

Used to expand into SOP before grouping.

SymbolMeaningUnit
Aˉ\bar{A}NOT A (complement)
ABA \cdot BA AND B
A+BA + BA 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

Browse the full circuit toolkit or start a guided lesson in topics.

Share