A+B
¬A
Boolean Algebra Calculator 2026
Evaluate logical expressions, generate complete truth tables, and explore Boolean laws. Supports AND, OR, NOT, XOR, NAND and NOR — ideal for students, engineers and developers.
Expression Builder
Enter a Boolean expression using variables A–Z and operators below
Use variables A–Z (uppercase). Parentheses supported for grouping.
Also accepts: && · & for AND | || + for OR ! ~ for NOT ^ for XOR
Truth Table generates all possible input combinations. Single Evaluation lets you set each variable manually.
Result
Expression output, truth table & variable summary
Enter a Boolean expression above and click Evaluate Expression to see the full truth table and result.
Boolean Laws & Identities
Fundamental Boolean algebra laws used in digital circuit simplification, logic design, and programming. Apply these to reduce complex expressions to their simplest form.
| Law Name | Expression Form 1 | Expression Form 2 (Dual) | Description |
|---|---|---|---|
| Identity | A AND 1 = A | A OR 0 = A | No change with identity element |
| Null / Annihilator | A AND 0 = 0 | A OR 1 = 1 | Null element dominates |
| Idempotent | A AND A = A | A OR A = A | Redundant inputs cancel |
| Complement | A AND NOT A = 0 | A OR NOT A = 1 | Variable + its inverse |
| Double Negation | NOT (NOT A) = A | — | Two negations cancel out |
| Commutative | A AND B = B AND A | A OR B = B OR A | Order does not matter |
| Associative | (A AND B) AND C = A AND (B AND C) | (A OR B) OR C = A OR (B OR C) | Grouping does not matter |
| Distributive | A AND (B OR C) = (A AND B) OR (A AND C) | A OR (B AND C) = (A OR B) AND (A OR C) | Expand across operator |
| De Morgan’s | NOT(A AND B) = NOT A OR NOT B | NOT(A OR B) = NOT A AND NOT B | Negate compound expression |
| Absorption | A AND (A OR B) = A | A OR (A AND B) = A | Redundant term absorbed |
Boolean Algebra FAQ
Answers to common questions about Boolean logic, operators, truth tables, and how to use this calculator.
Boolean algebra is the mathematical foundation of digital logic circuits, computer processors, programming conditionals, and database query filters. It operates on variables that can only be true (1) or false (0), using operators like AND, OR, and NOT to define logical relationships.
This calculator supports AND (&& or ·), OR (|| or +), NOT (! or ~), XOR (^), NAND, NOR, and XNOR. Variables can be single letters (A–Z) and parentheses are fully supported for grouping sub-expressions.
A truth table lists every possible combination of input variable values (0 and 1) and shows the output for each combination. Each row represents one scenario. If your expression has 2 variables, there are 4 rows (2²). Three variables produce 8 rows (2³), and so on.
De Morgan’s theorem states two key equivalences: NOT(A AND B) equals (NOT A) OR (NOT B), and NOT(A OR B) equals (NOT A) AND (NOT B). These laws are fundamental to simplifying logic circuits and are widely used in digital design to convert NAND and NOR gates.
OR outputs 1 if at least one input is 1 (including when both are 1). XOR (exclusive OR) outputs 1 only when the inputs are different — it outputs 0 when both inputs are the same. XOR is used in adder circuits, parity checks, and encryption algorithms.
