Edexcel International Advanced Level Computer Science, point 15.4.1
Definition
Boolean algebra is a set of rules for manipulating logical expressions (5.3.1), whose variables are true (1) or false (0). Its laws let you rewrite an expression in a simpler or different form without changing its meaning.
Notation (Appendix 2 of the specification): AND is , OR is , NOT is (a bar over the letter).
Function and why needed
- Simplify expressions, so that a circuit needs fewer gates (cheaper, faster, less power).
- Show that two expressions are equivalent.
- Understand and design digital logic, and optimise conditions in programs.
The basic identities
| Law | AND form | OR form |
|---|---|---|
| Identity | ||
| Null (domination) | ||
| Idempotent | ||
| Complement | ||
| Double negation |
The laws you need
a. Commutative law
The order of the operands doesn't matter.
b. Associative law
The grouping of operands doesn't matter (for the same operator).
c. Absorption law
One term "absorbs" another.
Why: .
d. Distributive law
AND distributes over OR, and (unlike ordinary algebra) OR distributes over AND.
e. De Morgan's laws
Break the bar, change the operator.
In words: NOT (A AND B) = (NOT A) OR (NOT B), and NOT (A OR B) = (NOT A) AND (NOT B).
Checking a law with a truth table
De Morgan's first law:
| 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 bold columns match, so the expressions are equivalent.
Simplifying expressions
Method: apply the laws one step at a time, naming the law used, until no more simplification is possible.
Example 1: simplify .
| Step | Law |
|---|---|
| Distributive (factor out A) | |
| Complement () | |
| Identity |
Example 2: simplify .
| Step | Law |
|---|---|
| Distributive (OR over AND) | |
| Complement | |
| Identity |
Example 3: simplify .
| Step | Law |
|---|---|
| De Morgan (first law) | |
| De Morgan (second law) and double negation |
Example 4: use absorption on .
| Step | Law |
|---|---|
| Commutative (reorder) | |
| Absorption ( absorbs every term containing ) |
Showing two expressions are equivalent
Two ways:
- Truth table: complete both columns for every combination and compare.
- Algebra: transform one side into the other using the laws.
Example: show .
by De Morgan's law and double negation. ✓
Why simplify? A circuit example
needs two AND gates, a NOT gate and an OR gate (4 gates). It simplifies to , which is just a wire (0 gates).
Worked example
Task: simplify , naming each law.
| Step | Law |
|---|---|
| De Morgan (second law) | |
| Double negation | |
| Distributive | |
| Complement | |
| Identity |
Check with a truth table at A = 1, B = 0: the original is , and the result . ✓ At A = 0, B = 1: , and . ✓
Exam tip: write one law per line and name it. De Morgan: break the bar and change the operator (AND to OR, OR to AND). A common error is to break a bar without changing the operator. Check your simplified answer with one or two values. Use the notation in the exam paper.
Check yourself
State De Morgan's two laws
NOT(A AND B) = (NOT A) OR (NOT B), and NOT(A OR B) = (NOT A) AND (NOT B).
Simplify A + A·B
A (absorption law).
What is A · A̅ (A AND NOT A)?
0 (the complement law).
Simplify A·B + A·B̅
A. Factor out A to get A·(B + B̅), then B + B̅ = 1, leaving A·1 = A.
Give two ways to show that two Boolean expressions are equivalent
Complete truth tables for both and compare the output columns, or use the laws of Boolean algebra to transform one into the other.