Student
IGCSE
Topic 10 · IGCSE 0478 · Paper 2

Boolean Logic

6 subtopics · 1 worksheet
Your progress
0%
10.1 Basic gates
10.2 More gates
10.3 Truth tables
10.4 Circuits
10.5 Expressions
10.6 Capstone
Lesson 1 of 5 · Subtopic 10.1 — Basic gates

Meet the NOT gate

💡
A logic gate takes one or more inputs, each a 0 or a 1, and produces a single output. The simplest is the NOT gate, also called an inverter. It has one input and flips it: 0 becomes 1, and 1 becomes 0. Toggle the input below and watch the output.
Try it: flip the input

The little circle on the tip of the triangle is the giveaway for a NOT gate. Whatever goes in, the opposite comes out.

Recognise it
Which is which?A NOT gate has one input. If that input is 1, what is the output?
Lesson 2 of 5 · Subtopic 10.1 — Basic gates

The AND gate

🔒
The AND gate has two inputs and outputs 1 only when both inputs are 1. Think of two switches in a row: the light comes on only if both are pressed. Toggle A and B and watch the output, and the highlighted row of the truth table, change.
Try it: both must be on

The flat back and rounded front (a D shape) is the AND gate. Its truth table has a single 1, on the bottom row, where both inputs are 1.

Recognise it
Which is which?The AND gate outputs 1 when…
Lesson 3 of 5 · Subtopic 10.1 — Basic gates

The OR gate

🔆
The OR gate has two inputs and outputs 1 when at least one input is 1. It is only 0 when both inputs are 0. Toggle the inputs and compare its truth table with the AND gate you just met.
Try it: one is enough

The curved back and pointed front is the OR gate. Its truth table has a single 0, on the top row, where both inputs are 0.

Recognise it
Which is which?The OR gate outputs 0 when…
Lesson 4 of 5 · Subtopic 10.1 — Basic gates

Complete the truth tables

📋
Now do it yourself. For each gate, set the output cell for every row, then check. In the exam you write a truth table like this, one row per possible combination of inputs.
NOT
Complete it. Fill the output column for the NOT gate.
AND
Complete it. Fill the output column for the AND gate.
OR
Complete it. Fill the output column for the OR gate.
Lesson 5 of 5 · Subtopic 10.1 — Basic gates

Name that gate

🎯
One way the exam tests these is by describing what a gate does and asking you to name it. Read each description and pick the gate.
Recognise it
Name the gateA gate outputs 1 whenever at least one of its inputs is 1. Which gate is it?
Recognise it
Name the gateA gate has a single input and reverses it. Which gate is it?
Lesson 1 of 5 · Subtopic 10.2 — More gates

The NAND gate

🚫
The next three gates are the first three with a twist. NAND means "not AND": it is an AND gate followed by a NOT. So it outputs the opposite of AND. It is 0 only when both inputs are 1, and 1 the rest of the time. The little circle on the output is the sign that a gate has been inverted.
Try it: the opposite of AND

Compare this table with the AND gate: every output is flipped. The AND shape with a bubble on the tip is the NAND gate.

Recognise it
Which is which?The NAND gate outputs 0 when…
Lesson 2 of 5 · Subtopic 10.2 — More gates

The NOR gate

🚭
NOR means "not OR": an OR gate followed by a NOT, so it outputs the opposite of OR. It is 1 only when both inputs are 0, and 0 the rest of the time. Same bubble on the output, this time on the OR shape.
Try it: the opposite of OR

Compare this table with the OR gate: every output is flipped. The OR shape with a bubble on the tip is the NOR gate.

Recognise it
Which is which?The NOR gate outputs 1 when…
Lesson 3 of 5 · Subtopic 10.2 — More gates

The XOR gate

⚖
XOR means "exclusive OR". It outputs 1 only when the two inputs are different, and 0 when they are the same. Think of it as "one or the other, but not both". Its symbol is the OR shape with a second curved line across the back.
Try it: different means 1

Notice the pattern: 0 and 0 gives 0, 1 and 1 gives 0, but a mismatch gives 1. The double line on the back of an OR shape is the XOR gate.

Recognise it
Which is which?The XOR gate outputs 1 when…
Lesson 4 of 5 · Subtopic 10.2 — More gates

Complete the truth tables

📋
Fill the output column for each of the three new gates. Remember: NAND is flipped AND, NOR is flipped OR, and XOR is 1 only when the inputs differ.
NAND
Complete it. Fill the output column for the NAND gate.
NOR
Complete it. Fill the output column for the NOR gate.
XOR
Complete it. Fill the output column for the XOR gate.
Lesson 5 of 5 · Subtopic 10.2 — More gates

Name that gate

🎯
You now know all six gates on the syllabus. Read each description and name the gate it fits.
Recognise it
Name the gateA gate outputs 1 only when its two inputs are different. Which gate is it?
Recognise it
Name the gateA gate is an AND followed by a NOT: it outputs 0 only when both inputs are 1. Which gate is it?
Recognise it
Name the gateA gate is an OR followed by a NOT: it outputs 1 only when both inputs are 0. Which gate is it?
Lesson 1 of 5 · Subtopic 10.3 — Truth tables

Every combination, in order

🔢
A truth table lists the output for every possible combination of inputs. With 2 inputs there are 4 combinations, with 3 inputs there are 8. The rule is simple: each extra input doubles the rows, because it is 2 to the power of the number of inputs. Write the inputs counting up in binary, 00, 01, 10, 11, so you never miss one.
Recognise it
Count the rowsA truth table has 3 inputs. How many rows does it need?
Complete it: A AND (NOT B)
Complete it. Work each row: find NOT B first, then AND it with A.
Lesson 2 of 5 · Subtopic 10.3 — Truth tables

Building up with a working column

🧩
When an expression joins two gates, work it in parts. For (A AND B) OR C, first work out A AND B for each row, then OR that result with C. On paper you would add a middle column for A AND B, then the final column. Here, just give the final output for each of the 8 rows.
Complete it: (A AND B) OR C
Complete it. A AND B first, then OR with C. If C is 1, the whole row is 1.
Lesson 3 of 5 · Subtopic 10.3 — Truth tables

Where the NOT sits matters

❗
Brackets decide what a NOT applies to. NOT (A OR B) means "do A OR B, then invert the whole thing" (that is the NOR gate). It is not the same as inverting just one input. Always do what is inside the brackets first, then apply the NOT outside.
Recognise it
Order of workingIn NOT (A AND B), what do you work out first?
Complete it: NOT (A OR B)
Complete it. Do A OR B for each row, then invert. This is the NOR gate.
Lesson 4 of 5 · Subtopic 10.3 — Truth tables

Two to finish yourself

📋
Two three-input tables, each combining two gates. Work each row in parts, then set the final output.
(A OR B) AND C
Complete it. A OR B first, then AND with C. The row is only 1 when C is 1.
(A AND B) OR (NOT C)
Complete it. A AND B first, and NOT C separately, then OR the two together.
Lesson 5 of 5 · Subtopic 10.3 — Truth tables

One with two gates

🏆
Last one, and it uses two gates: (A XOR B) AND C. Work out A XOR B (1 when A and B differ), then AND with C.
Recognise it
Listing orderWriting every combination of A, B and C in binary, you count from 000 up to…
Complete it: (A XOR B) AND C
Complete it. A XOR B is 1 only when A and B differ. Then AND that with C.
Lesson 1 of 5 · Subtopic 10.4 — Circuits

Reading a logic circuit

🔌
A logic circuit wires gates together. Signals flow left to right: inputs on the left, through the gates, to the output on the right. Here the AND gate feeds one input of an OR gate. Toggle A, B and C and watch the signal light up green where it is 1, all the way to the output X.
Trace it: (A AND B) OR C

Work a circuit the same way every time: start at the inputs, find the output of each gate in turn, and carry those values forward until you reach X.

Recognise it
Read the outputIn this circuit, if A = 1, B = 0 and C = 1, what is the output X?
Lesson 2 of 5 · Subtopic 10.4 — Circuits

A circuit with a NOT

🔄
A NOT gate in the path flips the signal before it reaches the next gate. Here A goes through a NOT first, then into an AND with B. Toggle the inputs: notice that the wire coming out of the NOT is the opposite of the wire going in.
Trace it: (NOT A) AND B

Deal with the NOT as you reach it: invert the value on its input wire, then carry that result into the next gate.

Recognise it
Read the outputIf A = 1 and B = 1, what is the output of (NOT A) AND B?
Lesson 3 of 5 · Subtopic 10.4 — Circuits

From circuit to truth table

📋
The exam often shows a circuit and asks for its truth table. The method: name the output of the middle gate, fill that column first, then the final output. Use the live circuit to check any row you are unsure of by setting the inputs.
The circuit
Complete its truth table
Complete it. Fill the A AND B column first, then OR each with C for the output.
Lesson 4 of 5 · Subtopic 10.4 — Circuits

A circuit with two branches

🎛
This one splits into two branches that meet at the final gate: A OR B on top, and NOT C below. Fill a working column for each branch, then combine them with the AND.
The circuit
Complete its truth table
Complete it. Fill A OR B and NOT C, then AND those two together.
Lesson 5 of 5 · Subtopic 10.4 — Circuits

One to finish

🏆
Last circuit for this subtopic: A AND B on top, NOT C below, joined by an OR. Trace it live if you need to, then complete the table on your own.
The circuit
Complete its truth table
Complete it. A AND B and NOT C into the working columns, then OR them for the output.
Recognise it
The methodTo find a circuit's output for a row, you work…
Lesson 1 of 5 · Subtopic 10.5 — Expressions

From circuit to expression

📝
A logic expression writes a circuit as text, using AND, OR and NOT with brackets. To read one off a circuit, name the output of each gate, then combine them. Here the AND gate gives A AND B, and the OR joins that with C.
The circuit

Read the circuit backwards

Start at X. Follow its wire back to the final gate, then find where each input to that gate comes from.

ABC ANDOR PX
1 · Find the final gate

X comes from OR. Its inputs are the wire labelled P and the wire from C. Write X = P OR C.

2 · Trace the wire P

Follow P back to the AND gate. A and B are its inputs, so P = A AND B.

3 · Put the expression together

Replace P with the entire AND expression. The brackets keep those two inputs together as one input to OR.

X = (A AND B) OR C

Recognise it
Match the expressionWhich expression describes this circuit?
Lesson 2 of 5 · Subtopic 10.5 — Expressions

Write the expression yourself

✍
Now you write it. This circuit sends A through a NOT, then into an AND with B. Type the expression. Any correct form is accepted, so use brackets to make the order clear.
The circuit
Write it
Your turn. Write the logic expression for the output of this circuit.
Insert:
Lesson 3 of 5 · Subtopic 10.5 — Expressions

A circuit with two branches

🌿
Two branches meet at the final gate: A OR B on top, NOT C below, joined by an AND. Write an expression for each branch, then combine them with the final gate.
The circuit
Write it
Your turn. Write the logic expression for this circuit's output.
Insert:
Lesson 4 of 5 · Subtopic 10.5 — Expressions

From a problem in words

🏭
The hardest version gives a real situation in words. Pick out each condition, turn "and", "or", "not" into gates, and mind the brackets. Read the scenario, then write the expression.
Greenhouse fan

A greenhouse fan output F switches on when the temperature is high (H = 1) and the window is closed (that is, NOT W), or when the manual override V is on.

Write it: the expression for F
Your turn. Write an expression for F using H, W and V.
Insert:
Lesson 5 of 5 · Subtopic 10.5 — Expressions

One more from words

🔑
Last one. Watch the "either ... or" phrasing: it groups two conditions together with an OR inside brackets before the AND is applied.
Door lock

A door unlocks (output X) when the correct card C is present and either the PIN P is entered or the manager key M is used.

Write it: the expression for X
Your turn. Write an expression for X using C, P and M.
Insert:
Lesson 1 of 5 · Subtopic 10.6 — Capstone

Warm-up: all six gates

🏃
Time to put the whole topic together. First a quick warm-up across the six gates and the truth-table rule, then a full problem worked end to end.
Recognise it
Name the gateWhich gate outputs 1 only when both inputs are 1?
Recognise it
Name the gateWhich gate outputs 1 only when its two inputs are different?
Recognise it
Count the rowsA truth table has 3 inputs. How many rows does it need?
Lesson 2 of 5 · Subtopic 10.6 — Capstone

The boiler: circuit to truth table

🔥
Here is the scenario for the next three lessons. A boiler B turns on when the thermostat calls for heat (T) and either the timer M is active or the manual override V is on. First, trace the circuit and complete its truth table.
The circuit
Complete its truth table
Complete it. Fill the M OR V column first, then AND each with T for the output B.
Lesson 3 of 5 · Subtopic 10.6 — Capstone

The boiler: write the expression

✍
Same circuit, now write its logic expression. Remember the timer-or-override pair is bracketed before the AND with the thermostat.
The circuit
Write it: the expression for B
Your turn. Write the logic expression for B using T, M and V.
Insert:
Lesson 4 of 5 · Subtopic 10.6 — Capstone

A new problem in words

🧸
A fresh scenario, straight from words to an expression. Watch the "but not" phrasing: it adds a NOT condition that must also hold.
Washing machine

A washing machine starts (output S) when the door is closed (D) and the start button is pressed (P), but not while it is in a fault state (F).

Exam-style challenge · Cold-room alarm

The alarm X sounds if the temperature is too high, or if the door is open while maintenance mode is off. X is 1 when the alarm sounds and 0 otherwise.

H
1 when the temperature is too high, 0 otherwise
D
1 when the door is open, 0 when closed
M
1 when maintenance mode is on, 0 when off

Try each task on paper, in any order. Open its worked answer when you’re ready to compare.

1 · Write the Boolean expression

Maintenance must be off for the open-door condition, so use NOT M. Join it to D with AND. High temperature is a separate trigger, joined with OR.

X = H OR (D AND (NOT M))

2 · Draw the logic circuit using standard gate symbols

Send M through NOT. Feed its output and D into AND. Feed the AND output and H into OR, then label the final wire X.

HDM NOTAND ORX
3 · Complete the truth table for all eight input combinations

Work out NOT M first, then D AND (NOT M). When H is 1, the final OR outputs 1 even if maintenance mode is on.

Cold-room alarm · worked truth table
HDMNOT MD AND (NOT M)X
000100
001000
010111
011000
100101
101001
110111
111001
Write it: the expression for S
Your turn. Write an expression for S using D, P and F.
Insert:
Lesson 5 of 5 · Subtopic 10.6 — Capstone

The written finish

🏆
One written question to close the topic. Answer it in your own words, then check it against the model.
🅳 Exam question · 3 marks
A logic circuit has two inputs, P and Q. Describe the steps you would take to produce its complete truth table.
Resources · Topic 10

Quick Reference

Everything Topic 10 covers, in one place. Use it to revise before the exam or as a quick reference while you work through circuits.

The six gates (10.1, 10.2)

NOT=one input, reversed: 0 becomes 1, 1 becomes 0
AND=1 only when both inputs are 1
OR=1 when at least one input is 1
NAND=opposite of AND: 0 only when both inputs are 1
NOR=opposite of OR: 1 only when both inputs are 0
XOR=1 only when the two inputs are different

Reading the symbols

NOT→triangle with a small circle at the tip
AND→flat back, rounded front (a D shape)
OR→curved back, pointed front
The bubble=a small circle on the output means "inverted" (NAND, NOR, NOT)
XOR→an OR shape with a second curved line across the back

Truth tables (10.3)

Rows needed=2 to the power of the number of inputs: 2 inputs → 4, 3 inputs → 8
List inputs→count up in binary, 00, 01, 10, 11, so none is missed
Working columns→add a column for each gate output, then the final column
Brackets first→NOT (A OR B) means do A OR B, then invert it all

Reading a circuit (10.4)

Direction→signals flow left to right: inputs, through gates, to the output
Method→find each gate's output in turn and carry it forward
A NOT in the path→invert the wire's value as you reach it
Circuit to table→name each middle output, fill those columns, then the output

Writing an expression (10.5)

Operators=NOT, AND, OR, NAND, NOR, XOR (EOR), with brackets to set the order
From a circuit→name each gate output, then combine them at the final gate
"and"→AND
"or" / "either ... or"→OR (bracket the "either ... or" pair)
"not" / "but not"→NOT applied to that condition

Exam technique (10.6)

Trace values forwards→from inputs through gates to X. To construct an expression, start at the final gate and substitute its branches
Show working columns→they help prevent mistakes; the specific mark scheme determines credit
Mind the brackets→they change the meaning, so read the wording carefully
Check a row→pick one input combination and trace it end to end to test your answer