CIE AS & A Level Computer Science, section 15.2 (Boolean algebra and logic circuits)
Notation
Operation
Symbol
NOT A
A
A AND B
A⋅B
A OR B
A+B
A XOR B
A⊕B
Laws of Boolean algebra
Law
AND form
OR form
Identity
A⋅1=A
A+0=A
Null
A⋅0=0
A+1=1
Idempotent
A⋅A=A
A+A=A
Inverse
A⋅A=0
A+A=1
Commutative
A⋅B=B⋅A
A+B=B+A
Distributive
A⋅(B+C)=A⋅B+A⋅C
A+B⋅C=(A+B)(A+C)
Absorption
A⋅(A+B)=A
A+A⋅B=A
Double negation
A=A
De Morgan's laws
A⋅B=A+BA+B=A⋅B
To apply: break the bar and change the operator (AND becomes OR, OR becomes AND).
Worked example
Simplify X=A⋅B+A⋅B.
Factor out A: X=A⋅(B+B).
Inverse law: B+B=1.
So X=A⋅1=A.
Uses
Simplified expressions need fewer gates, so circuits are cheaper, smaller and faster. De Morgan's laws let a circuit be built with only NAND (or NOR) gates.
Common mistake: moving the bar but forgetting to change the operator. A⋅B is notA⋅B. Also, A+A is 1 and A⋅A is 0, not the other way round.
Exam tip: show each step with the law you use named beside it. Verify a result by testing a couple of input combinations in a truth table.
Check yourself
Apply De Morgan’s law to A+B.
A⋅B.
Simplify A+A⋅B.
A, by the absorption law.
Why is it useful to simplify a Boolean expression?
The circuit needs fewer gates, so it is cheaper, smaller and faster.