A Level · Topic 15.2
A-Level Computer Science 9618 / Topic 15 / A2

Fewer gates, same logic.

Boolean algebra lets you rewrite a logic expression into a simpler one that gives exactly the same truth table, so the circuit needs fewer gates. This lesson sets out the laws, De Morgan's laws in particular, and works through simplifications step by step.

The key idea

In Boolean algebra A.B means A AND B, A + B means A OR B and a bar over a term means NOT, so A is NOT A. The laws of Boolean algebra (identity, null, idempotent, inverse, commutative, associative, distributive, absorption) let an expression be rewritten without changing its truth table. De Morgan's laws say A.B = A + B and A + B = A.B: break the bar and change the operator. Simplifying an expression means fewer gates, so a circuit that is cheaper, smaller, faster and uses less power. A simplification can always be checked by comparing the truth tables of the original and the result.

De Morgan's laws as gate equivalences A B X NOT (A.B) = A B X NOT A + NOT B A B X NOT (A + B) = A B X NOT A . NOT B break the bar, change the operator: a bubble on each input swaps AND and OR
Fig. 1: a NAND gate does the same job as an OR gate with both inputs inverted, and a NOR gate the same as an AND gate with both inputs inverted
Section 01

The laws of Boolean algebra.

Each law below is true for every combination of inputs, which you can check with a truth table. Most look like ordinary algebra; the ones marked absorption and redundancy do not, and they do most of the work in exam simplifications.

LawRule
IdentityA.1 = A
A + 0 = A
Null (annulment)A.0 = 0
A + 1 = 1
IdempotentA.A = A
A + A = A
Inverse (complement)A.A = 0
A + A = 1
Double complementA = A
CommutativeA.B = B.A
A + B = B + A
Associative(A.B).C = A.(B.C)
(A + B) + C = A + (B + C)
DistributiveA.(B + C) = A.B + A.C
A + B.C = (A + B).(A + C)
AbsorptionA + A.B = A
A.(A + B) = A
RedundancyA + A.B = A + B
A.(A + B) = A.B
De MorganA.B = A + B
A + B = A.B
Your turn
Use a truth table to show that A + A.B = A.
Examiner trap

In Boolean algebra A + A = A, not 2A, and A.A = A, not A squared. There are only two values, 0 and 1.

Section 02

De Morgan's laws.

De Morgan's laws turn a NAND into an OR of inverted inputs and a NOR into an AND of inverted inputs. They work for any number of inputs, which matters because circuits may include gates with three or more inputs.

Worked example De Morgan, then absorb
Simplify X = A.B + A + C.
  1. X = A.B + A + C
  2. = (A + B) + A.CDe Morgan on each bracket
  3. = A + B + A.Cdouble complement: the double bar on A cancels
  4. = A + A.C + Bcommutative: reorder
  5. = A + C + Bredundancy: A + NOT A.Y = A + Y
  6. = A + B + Creorder the answer
Answer: X = A + B + C
Your turn
Use De Morgan's laws to show that A + B = A.B.
Examiner trap

The commonest error is to break the bar but forget to change the operator. A + B is not A + B: try A = 1, B = 0, which gives 0 on the left and 1 on the right.

Stage 1 · Learn

Check what the sim just showed you

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

Which expression is equivalent to A.B?

Quick check+10 XP

What does A + A.B simplify to?

Quick check+10 XP

What is A.A?

Quick check+10 XP

Why is it worth simplifying a logic circuit?

Section 03

Simplifying step by step.

Expand brackets, collect terms, then look for the patterns X + X = X, X + X = 1, X + X.Y = X and X + X.Y = X + Y. Write one law per line so each step earns credit. Check your answer in the lab: build the original and the simplified expression and compare their truth tables.

Worked example Taking out a common factor
Simplify X = A.B + A.B.
  1. X = A.B + A.B
  2. = A.(B + B)distributive: take out A
  3. = A.1inverse: B + NOT B = 1
  4. = Aidentity
Answer: X = A
Worked example Expand, then absorb
Simplify X = A.B + A.(B + C) + B.(B + C).
  1. X = A.B + A.(B + C) + B.(B + C)
  2. = A.B + A.B + A.C + B.B + B.Cdistributive: expand both brackets
  3. = A.B + A.C + B + B.Cidempotent: A.B + A.B = A.B and B.B = B
  4. = A.B + A.C + Babsorption: B + B.C = B
  5. = B + A.Cabsorption: B + A.B = B
Answer: X = B + A.C
Worked example A product of sums
Simplify X = (A + B).(A + C).
  1. X = (A + B).(A + C)
  2. = A.A + A.C + B.A + B.Cdistributive: multiply out
  3. = A + A.C + A.B + B.Cidempotent: A.A = A; commutative: B.A = A.B
  4. = A + B.Cabsorption: A + A.C = A and A + A.B = A
Answer: X = A + B.C
Your turn
Simplify X = A.B + A.B + A.B.
Examiner trap

An answer with no working rarely earns full marks. Show each law you use, and do not combine several laws in one line.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to A Level Paper 3 and Paper 4 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

Which is the simplest form of A.B + A.B + A.B?

Exam style+20 XP

Which expression is equivalent to A + B?

Exam style+20 XP

Which law is used in the step A.(B + C) = A.B + A.C?

Exam style+20 XP

What is the simplest form of (A + B).(A + B)?

Skill unlocked

Boolean algebra, mastered.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Boolean algebra laws, De Morgan's laws and simplification.