EN

Boolean algebra

Laws, formulas and logic expression simplifier

Boolean expression simplifier

Type an expression with the variables A–F. You can use + (OR), ·, * or nothing (AND: AB = A·B), ' or ! (NOT), ^ (XOR) and brackets.

Expression

Examples: sums of minterms · distributive · consensus · De Morgan · three-input XOR

Laws of Boolean algebra

Each law has a dual version, obtained by swapping + for · and 0 for 1.

LawOR formAND form
Identity\(A + 0 = A\)\(A \cdot 1 = A\)
Null element\(A + 1 = 1\)\(A \cdot 0 = 0\)
Idempotence\(A + A = A\)\(A \cdot A = A\)
Complement\(A + \overline{A} = 1\)\(A \cdot \overline{A} = 0\)
Involution\(\overline{\overline{A}} = A\)
Commutative\(A + B = B + A\)\(A \cdot B = B \cdot A\)
Associative\(A + (B + C) = (A + B) + C\)\(A(BC) = (AB)C\)
Distributive\(A + BC = (A + B)(A + C)\)\(A(B + C) = AB + AC\)
Absorption\(A + AB = A\)\(A(A + B) = A\)
Absorption of the complement\(A + \overline{A}B = A + B\)\(A(\overline{A} + B) = AB\)
De Morgan\(\overline{A + B} = \overline{A}\cdot\overline{B}\)\(\overline{A \cdot B} = \overline{A} + \overline{B}\)
Consensus\(AB + \overline{A}C + BC = AB + \overline{A}C\)\((A + B)(\overline{A} + C)(B + C) = (A + B)(\overline{A} + C)\)
XOR\(A \oplus B = A\overline{B} + \overline{A}B\)

How to simplify an expression

By algebra

Example: \(f = \overline{A}\,\overline{B}\,C + \overline{A}\,B\,C + A\,\overline{B}\,C + A\,B\,\overline{C}\)
\[ \overline{A}C(\overline{B} + B) + A\overline{B}C + AB\overline{C} = \overline{A}C + A\overline{B}C + AB\overline{C} \]

Applying absorption of the complement to \(\overline{A}C + A\overline{B}C = C(\overline{A} + A\overline{B}) = C(\overline{A} + \overline{B})\):

\[ f = \overline{A}C + \overline{B}C + AB\overline{C} \]

This is the same expression the calculator gives for the example it loads.

By Karnaugh map or Quine-McCluskey

With more than three or four variables, algebra becomes slow and it is easy to make mistakes. The Karnaugh map solves it graphically up to six variables, and the Quine-McCluskey method (the one this calculator uses) does it systematically: it combines minterms that differ in a single bit until it obtains the prime implicants, and chooses the smallest number of them that covers the function.