Boolean Algebra Calculator

Type a Boolean expression and get it simplified, with the law used at each step, the gate count before and after, and the truth table that proves the two are the same function.

NOT A' · AND AB · OR A + B · XOR A ^ B · minterms Σm(1, 3, 5) or 1,3,5

Try

How to use the Boolean algebra calculator

  1. Type the expression. Write NOT as A' or !A, AND as AB or A*B, OR as A + B and XOR as A ^ B.
  2. Read the simplified form. The answer at the top is the minimal sum of products, with the number of gates and literals before and after.
  3. Follow the steps. Each line names the law that was applied and shows the expression after it. The truth table at the bottom is the check: the simplified form gives the same output on every row.

The laws of Boolean algebra

Simplifying by algebra means rewriting an expression with identities that never change its truth table. These are the identities it works with:

LawAND formOR form
IdentityA · 1 = AA + 0 = A
NullA · 0 = 0A + 1 = 1
IdempotentA · A = AA + A = A
ComplementA · A' = 0A + A' = 1
Double negation(A')' = A
DistributiveA(B + C) = AB + ACA + BC = (A + B)(A + C)
AbsorptionA(A + B) = AA + AB = A
Absorption with a complementA(A' + B) = ABA + A'B = A + B
De Morgan's theorem(AB)' = A' + B'(A + B)' = A'B'

A worked example

Simplify F = A + A'B. The distributive law in its OR form turns it into (A + A')(A + B). The complement law makes the first bracket 1, and the identity law removes it, leaving F = A + B. The calculator reports the same result as a single step, absorption with a complement.

Algebra does not always reach the smallest form on its own, because which law to apply next is a matter of judgement. So the calculator also minimizes the function from its truth table — the same grouping a K-map does — and that is the answer shown at the top.

Questions

Does the calculator show its steps?

Yes. Each step names the law applied — De Morgan's theorem, absorption, the distributive law and so on — and shows the expression after it.

How do I know the simplified expression is right?

The calculator builds the truth table of the original and of the result and compares every row. The table is shown at the bottom of the answer.

What is the difference between this and a K-map?

They reach the same minimal sum of products by different routes. Algebra rewrites the expression law by law; a K-map groups the 1s of the truth table. The K-map solver draws the groups for the same function.

How do I type a NOT, or a bar over a term?

Put an apostrophe after the term, as in A' or (A + B)', or an exclamation mark or tilde before it.

More free logic calculators

When a calculator is not enough.

The Logic Gate Simulator keeps the expression, the truth table, the K-map and the circuit side by side, and saves your work.