Boolean Algebra Calculator
Enter an expression. Get the truth table, minterms, SOP and POS.
Examples: A&B + !C · (A+B)(A+C) · A^B^C · !(A&B)
Accepted notation
| Operation | Type any of | Example |
|---|---|---|
| NOT | !A ~A A' ¬A | !A |
| AND | & * . or nothing at all | A&B, AB |
| OR | + | ∨ | A+B |
| XOR | ^ ⊕ | A^B |
| Constants | 0 1 | A&1 |
| Grouping | ( ) | (A+B)C |
Implicit AND is supported, so AB, A&B and A.B are the same expression, and postfix negation works on groups: (A+B)'.
Precedence
NOT binds tightest, then AND, then OR, then XOR. So A + B&C is A + (B&C). Parenthesise when in doubt — the calculator will not guess what you meant.
Minterms, maxterms, SOP and POS
A minterm is a row where the output is 1; a maxterm is a row where it is 0. The canonical sum of products ORs together one product term per minterm, each term ANDing every variable in true or complemented form. The canonical product of sums ANDs together one sum term per maxterm, with the variables inverted relative to SOP. Both describe the same function; SOP is usually shorter when the output is mostly 0, POS when it is mostly 1.
The laws used to simplify by hand
| 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 |
| Absorption | A · (A + B) = A | A + A · B = A |
| De Morgan | (A · B)' = A' + B' | (A + B)' = A' · B' |
| Distributive | A · (B + C) = AB + AC | A + BC = (A+B)(A+C) |
De Morgan's laws are the pair students most often apply wrongly: negating a bracket flips the operator inside it as well as negating each term. Enter !(A&B) and !A + !B above and compare the two truth tables — they match.