Boolean Algebra Calculator
Type a Boolean expression in up to four variables to get its truth table, minterms, maxterms, canonical sum of products and the simplified (minimal) form.
AND: AB, A&B, A*B · OR: A+B, A|B · NOT: A', !A · XOR: A^B · NAND, NOR, XNOR words
Simplified (Minimal SOP)
A'C + AB
Minterms
Σm(1, 3, 6, 7)
Maxterms
ΠM(0, 2, 4, 5)
Canonical Sum of Products
A'B'C + A'BC + ABC' + ABC
Rows Where Output Is 1
4 of 8
| Row | A | B | C | Output |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 0 |
| 6 | 1 | 1 | 0 | 1 |
| 7 | 1 | 1 | 1 | 1 |
Boolean Expression Evaluator and Simplifier
Type any expression using A, B, C and D. The calculator builds the truth table, lists the minterms and maxterms, and finds the shortest sum-of-products form, the same answer a Karnaugh map gives.
Operators
| Operation | Accepted forms | Precedence |
|---|---|---|
| NOT | A', !A, ~A, NOT A | 1 (highest) |
| AND / NAND | AB, A&B, A*B, A·B, A AND B, A NAND B | 2 |
| XOR / XNOR | A^B, A XOR B, A XNOR B | 3 |
| OR / NOR | A+B, A|B, A OR B, A NOR B | 4 |
Key identities
- De Morgan (AB)′ = A′ + B′; (A + B)′ = A′B′
- Absorption A + AB = A; A(A + B) = A
- Consensus AB + A′C + BC = AB + A′C
- Distribution A + BC = (A + B)(A + C)
Worked examples
1. AB + A'C + BC (the default). Σm(1, 3, 6, 7); simplifies to A'C + AB.
2. (A + B)(A + C). Σm(3, 4, 5, 6, 7) → A + BC.
3. A'B'C' + A'BC' + AB'C' + ABC'. Every row with C = 0 → C'.
4. A NAND B. → A' + B' (De Morgan).
Where several minimal forms exist, the calculator shows one of them.
Related tools
- Bits: Binary Calculator. Error detection: Hamming Distance Calculator, CRC Calculator.
Frequently Asked Questions
How do I type an expression?
Use variables A to D. AND: AND, &, * or just write letters together (AB). OR: OR, | or +. NOT: NOT, !, ~ or a quote after the term (A'). XOR: XOR or ^. NAND, NOR and XNOR are also accepted.
What is the order of operations?
NOT first, then AND, then XOR, then OR. Use brackets to override: (A + B)C.
What is a minterm?
A product term containing every variable once, true for exactly one input row. Σm(1, 3) lists the rows (by binary number) where the output is 1.
What is a maxterm?
A sum term false for exactly one row. ΠM lists the rows where the output is 0; the product-of-sums form uses them.
How is the expression simplified?
With the Quine–McCluskey method: minterms are combined into prime implicants, then the smallest set covering every minterm is chosen. It gives the same result as a Karnaugh map.
Why does AB + A'C + BC simplify to AB + A'C?
By the consensus theorem, BC is redundant: whenever B and C are both 1, either AB or A'C is already 1.
What are the basic Boolean laws?
Identity A + 0 = A, A·1 = A; null A + 1 = 1, A·0 = 0; idempotent A + A = A; complement A + A' = 1, A·A' = 0; absorption A + AB = A; De Morgan (AB)' = A' + B' and (A + B)' = A'B'.
What is XOR?
Exclusive OR is 1 when the inputs differ: A XOR B = A'B + AB'. It is used in adders, parity and CRCs.
Why are NAND and NOR called universal?
Any logic function can be built from NAND gates alone (or NOR alone). NOT A = A NAND A.
How many rows does a truth table have?
2ⁿ for n variables: 4 rows for two variables, 8 for three and 16 for four.
Related Calculators
Binary Calculator
Convert between decimal, binary, octal, and hexadecimal number systems. Perform bitwise AND, OR, XOR, NOT, and shift operations.
Hamming Distance Calculator
Calculate the Hamming distance between two binary values. Determine the number of differing bit positions and error detection capability.
CRC Calculator
Calculate Cyclic Redundancy Check (CRC) values using polynomial division. Enter data and generator polynomial to compute CRC checksum.
Big O Complexity Calculator
Estimate algorithm performance based on input size and time complexity class. Compare O(1), O(log n), O(n), O(n log n), O(n^2), and O(2^n).
Floating Point Calculator
Convert a decimal number to its IEEE 754 floating point representation. View sign, exponent, and mantissa bits for single and double precision.
IP Subnet Calculator
Calculate subnet mask, network address, broadcast address, and number of usable hosts from an IP address and CIDR prefix length.
More in Computer Science · Engineering calculators · All calculators A–Z