You can simplify a Boolean expression by applying rules (laws), one step at a time, like algebra. A simpler expression means a simpler circuit (1.4.3 (d)). The notation is OCR's: ∧ (AND), ∨ (OR), ¬ (NOT) and ⊻ (XOR).
The rules you need
Commutation (order doesn't matter)
A∧B=B∧AA∨B=B∨A
Association (grouping doesn't matter)
A∧(B∧C)=(A∧B)∧CA∨(B∨C)=(A∨B)∨C
Distribution
AND distributes over OR, and OR distributes over AND:
A∧(B∨C)=(A∧B)∨(A∧C)A∨(B∧C)=(A∨B)∧(A∨C)
The first is like multiplying out brackets in ordinary algebra. The second has no equivalent in ordinary algebra, so take care.
Double negation
¬(¬A)=A
Two NOTs cancel out.
De Morgan's laws
¬(A∧B)=¬A∨¬B¬(A∨B)=¬A∧¬B
To apply them: break the bar (the NOT) over the expression, change the operator (∧ becomes ∨, and ∨ becomes ∧), and put a NOT on each term.
Check the first law with a truth table:
A
B
A∧B
¬(A∧B)
¬A
¬B
¬A∨¬B
0
0
0
1
1
1
1
0
1
0
1
1
0
1
1
0
0
1
0
1
1
1
1
1
0
0
0
0
The two columns for ¬(A∧B) and ¬A∨¬B are identical.
Other useful identities
Identity
Name
A∧0=0 and A∨1=1
Annulment
A∧1=A and A∨0=A
Identity
A∧A=A and A∨A=A
Idempotent
A∧¬A=0
Complement
A∨¬A=1
Complement
A∨(A∧B)=A and A∧(A∨B)=A
Absorption
Simplifying: step by step
State which rule you use at each step.
Example 1
Simplify Q=(A∧B)∨(A∧¬B).
Q=A∧(B∨¬B)(distribution, taking out A)Q=A∧1(complement: B∨¬B=1)Q=A(identity)
Q=(¬¬A∧¬¬B)∨(A∧C)(De Morgan)Q=(A∧B)∨(A∧C)(double negation)Q=A∧(B∨C)(distribution, taking out A)
Proving two expressions are equal
Two ways:
Truth tables: show that both expressions give the same output for every input.
Algebra: use the rules to transform one into the other, stating each rule.
Example: show that ¬(A∨B)∨(A∧B)=¬(A⊻B) using a truth table.
A
B
¬(A∨B)
A∧B
Left side
A⊻B
¬(A⊻B)
0
0
1
0
1
0
1
0
1
0
0
0
1
0
1
0
0
0
0
1
0
1
1
0
1
1
0
1
The "left side" and "¬(A⊻B)" columns match, so the two expressions are equal.
Worked example
Task: simplify Q=(¬A∧B)∨(A∧B)∨(A∧¬B).
Q=((¬A∨A)∧B)∨(A∧¬B)(distribution on the first two terms)Q=(1∧B)∨(A∧¬B)(complement)Q=B∨(A∧¬B)(identity)Q=(B∨A)∧(B∨¬B)(distribution of OR over AND)Q=(B∨A)∧1=A∨B(complement, identity, commutation)
Check with a truth table: Q is 1 for (A,B)=(0,1),(1,1),(1,0) and 0 for (0,0), which is A OR B. ✓
Exam tip: write one rule per step, and name it. With De Morgan, remember to change the operator and to put a NOT on each term. If you're stuck, check a possible simplification with a truth table.