Skip to content
Brainlag

Theme

Colour

Boolean algebra and De Morgan's laws

A-level Computer Science Updated Wed 7 Oct 2026

Boolean algebra lets you simplify a logic expression before building it, which means fewer gates. A dozen identities and De Morgan's laws are enough for every exam question; the skill is choosing which to apply next.

Part 1 of 3: Learn it

In short

  1. Here A.B means A AND B, A + B means A OR B, and ¬A means NOT A.
  2. De Morgan: ¬(A.B) = ¬A + ¬B and ¬(A + B) = ¬A.¬B.
  3. Absorption: A + A.B = A and A.(A + B) = A.

Where this is in your specification

Spec points: AQA 7517 4.6.4 and 4.6.5, OCR H446 1.4.3

BoardTopic: Boolean algebra and logic circuits
AQA 75174.6.4 and 4.6.5
OCR H4461.4.3

The identities

AND formOR form
A.0 = 0A + 1 = 1
A.1 = AA + 0 = A
A.A = AA + A = A
A.¬A = 0A + ¬A = 1
¬¬A = A
A.(B + C) = A.B + A.CA + B.C = (A + B).(A + C)

Commutative and associative rules also hold: the order of terms and the grouping of a run of ANDs (or of ORs) does not matter.

De Morgan's laws

To apply one: break the bar over the whole bracket, change the operator inside (AND to OR, or OR to AND), and put a NOT on each term. It works the other way too, which is how a long expression is rewritten to use only NAND or only NOR gates.

Universal gates

NAND on its own can make every other gate, and so can NOR. For example, NOT A is A NAND A, and A AND B is (A NAND B) NAND (A NAND B). Chips are often built from one gate type because it is cheaper to manufacture.

Quick check

Simplify A + A.B.

Show the answer

A (absorption).

Part 2 of 3: See it worked

Worked examples

Example 1

Simplify A.B + A.¬B.

  1. Factorise: A.(B + ¬B)
  2. B + ¬B = 1
  3. A.1 = A

Answer: A.

Example 2

Simplify ¬(¬A.B).

  1. De Morgan: ¬¬A + ¬B
  2. Double negation: ¬¬A = A

Answer: A + ¬B.

Common mistakes

  • Applying De Morgan without changing the operator.
  • Changing the operator but forgetting to negate each term.
  • Writing A + A = 2A. In Boolean algebra A + A = A.
  • Skipping steps so that a method mark cannot be given.
Quick check

Use De Morgan's law to rewrite ¬(A + B).

Show the answer

¬A.¬B.

Part 3 of 3: Test yourself

Check yourself

Answer each one in your head or on paper first, then open it to check.

Simplify A + A.B.

A (absorption).

Use De Morgan's law to rewrite ¬(A + B).

¬A.¬B.

How can a NOT gate be made from a NAND gate?

Connect both inputs of the NAND gate to A.

Jobs that use this

Each link opens the job profile on the National Careers Service (England). In the rest of the UK: My World of Work (Scotland), Careers Wales, nidirect careers (Northern Ireland).

Full lessons and marked practice for this course are coming soon to Brainlag Learn. See courses