Boolean algebra: simplifying expressions
To simplify is to find an equivalent formula with as few literals as possible. Fewer literals mean fewer gates in the circuit.
Rules
- A ∨ (A ∧ B) ≡ A
- A ∨ (¬A ∧ B) ≡ A ∨ B
- (A ∧ B) ∨ (A ∧ ¬B) ≡ A
- A ∧ ¬A ≡ 0, A ∨ ¬A ≡ 1
- Literal = every occurrence of a variable
Your turn
Three problems on this topic. Any equivalent formula counts.
- 1 · Simplify a formula
- 2
- 3
Simplify the formula as far as possible (at most 2 literals).
F = (B ∨ (A ∧ B ∧ C) ∨ ¬C) ∧ C
Simplified formula
Type formulas like A'B + C, ¬A ∧ B or !A & B. Any equivalent way of writing it counts. The symbol buttons insert a character.
Worked example
Simplify the formula as far as possible (at most 3 literals).
F = ¬C ∨ (¬B ∧ (¬C ∨ C) ∧ C ∧ ¬A)
Worked solution
- 1Truth table: F = 1 for 000, 001, 010, 100, 110
- 2Form the largest blocks of 1, 2, 4 or 8 adjacent cells (also across the edge). Prime implicants: ¬C · ¬A ∧ ¬B
- 3Smallest selection covering every 1: ¬A ∧ ¬B · ¬C (2 blocks, 3 literals)
- 4Result: F = (¬A ∧ ¬B) ∨ ¬C
Typical mistake: Missing absorption: A ∨ (A ∧ B) is just A, A ∨ (¬A ∧ B) is A ∨ B.
Common questions
How do I know it can’t get shorter?
A Karnaugh map or Quine-McCluskey tells you for sure. The trainer gives you the number of literals that can be reached.
