Home / Boolean Algebra

Boolean Algebra Calculator

Evaluate expressions with AND, OR, NOT, XOR, NAND and NOR over variables a–d — with the complete truth table generated automatically.

Variables: a, b, c, d (up to 4). Operators: AND, OR, NOT, XOR, NAND, NOR, parentheses, 0/1 constants.

Why Use This Tool?

Boolean expressions decide everything in computing — search filters, circuit logic, permission rules. This calculator evaluates any expression with proper operator precedence, then generates the full truth table so you can see every input combination's outcome.

Up to four variables means up to sixteen table rows — enough to verify a logic gate design, simplify a permission check, or settle an argument about operator precedence.

How It Works

  1. Type an expression using variables a–d and the word operators.
  2. Click evaluate — the result with all variables at 0 appears first.
  3. Read the full truth table showing every input combination.

Frequently Asked Questions

How do I simplify a boolean expression?

Generate the truth table first — rows with identical output patterns reveal equivalent expressions. Compare your simplified version's table against the original: identical tables prove equivalence.

What's the difference between XOR and OR?

OR is true when either side is true (including both); XOR is true only when exactly one side is true. The truth table makes the difference visible.

Which operator has highest precedence?

NOT binds tightest, then AND (and NAND), then XOR, then OR (and NOR) — and parentheses override everything, as the evaluator respects.

Tips & Things to Watch

  • NAND is functionally complete — any logic circuit can be built from NAND alone.
  • Test with all variables 0 first: it's the fastest way to spot an inverted expression.
  • De Morgan's laws: NOT(a AND b) = (NOT a) OR (NOT b) — verify it with the table.