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.
How to use the Boolean algebra calculator
- Type the expression. Write NOT as
A'or!A, AND asABorA*B, OR asA + Band XOR asA ^ B. - 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.
- 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:
| Law | AND form | OR form |
|---|---|---|
| Identity | A · 1 = A | A + 0 = A |
| Null | A · 0 = 0 | A + 1 = 1 |
| Idempotent | A · A = A | A + A = A |
| Complement | A · A' = 0 | A + A' = 1 |
| Double negation | (A')' = A | |
| Distributive | A(B + C) = AB + AC | A + BC = (A + B)(A + C) |
| Absorption | A(A + B) = A | A + AB = A |
| Absorption with a complement | A(A' + B) = AB | A + 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.