← IGCSE Computer Science Paper 2

Completing a truth table from a logic circuit

Follow one row of input values through each gate in the circuit, write each gate's output in an extra column, then copy the final value of X into the truth table.

Understanding Completing a truth table from a logic circuit in IGCSE Computer Science Paper 2

What it does: Three inputs give 2 x 2 x 2 = 8 combinations, so each one must appear once and be traced through the circuit. The extra column D holds the output of the AND gate, which is then the input to the NOT gate that produces X. Work row by row: pass the input values through each gate in turn and write down the result. A AND B = 1 AND 0 = 0. Then 0 OR C = 0 OR 0 = 0, so X is 0. NOT reverses its input, so NOT 1 = 0. A AND B = 1. The NOT gate then reverses it, so X = 0.

Common mistakes: The circuit has an AND gate feeding the OR gate, so the expression must be X = (A AND B) OR C. Line 1 uses OR, which does not match the intermediate column P = A AND B. The gate in the middle needs its own column. The table should have an extra column P (A, B, P, X) so the output of the OR gate can be written down before the NOT gate.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 562–580) and word search (Modules 539–580).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which describes the correct way to complete a truth table from a logic circuit?
Guess the output of X from the shape of the circuit and fill in the columnTrace each row of inputs through the gates one at a time and record the output
Matches
A=1, B=1: A AND B = 1, so X = NOT 1 = 1
↓
The NOT gate was applied wrongly. NOT 1 is 0, not 1, so X should be 0 on this row.
Applying
Meanings
Term
trace each row
Meaning
Follow one row of input values through each gate in the circuit, write each gate's output in an extra column, then copy the final value of X into the truth table.
Practice
X = (A AND B) OR C
Testing
Gaps
X = NOT
Check Answer
Spots
1X = (A OR B) OR C
2P = A AND B

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Gulper Eel' badge — Deep Streak, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which describes the correct way to complete a truth table from a logic circuit?
A. Trace each row of inputs through the gates one at a time and record the output ✓
B. Guess the output of X from the shape of the circuit and fill in the column
Work row by row: pass the input values through each gate in turn and write down the result.
2. A circuit has three inputs A, B and C. How many rows does its truth table need?
A. 6 rows
B. 8 rows ✓
Three inputs give 2 x 2 x 2 = 8 different combinations, so you need 8 rows.
3. A circuit is X = (A AND B) OR C. What is the best use of an extra column?
A. Add a column for A AND B and write that gate's output in it ✓
B. Add a column that repeats the value of C for every row
An extra column records the output of a gate in the middle of the circuit, so the later gate can use it.
4. A circuit has an AND gate with A = 1 and B = 0 feeding an OR gate with C = 0. What is X?
A. 0 ✓
B. 1
A AND B = 1 AND 0 = 0. Then 0 OR C = 0 OR 0 = 0, so X is 0.
5. Where does the final value for the X column come from?
A. The output of the first gate in the circuit, copied into the table
B. The output of the last gate in the circuit, copied into the table ✓
X is the output of the final gate, so copy that value into the X column for the row.

Match the Pairs

X = (A AND B) OR C → A circuit with two gates: A and B go into an AND gate, and its output goes into an OR gate with C to give X. Work out the AND column first, then X.
A=1, B=0, C=1: A AND B = 0, so X = 0 OR 1 = 1 → Tracing one row of a three-input truth table: write the AND gate output first, then use it to find X.
A three-input circuit needs a truth table with eight rows, covering every combination of A, B and C. → A B C: 000, 001, 010, 011, 100, 101, 110, 111
Label each gate's output with its own column, so the value that leaves one gate and goes into the next is recorded. → A B | D = A AND B | X = NOT D
A=1, B=1: A AND B = 1, so X = NOT 1 = 1 → The NOT gate was applied wrongly. NOT 1 is 0, not 1, so X should be 0 on this row.
Truth table for a three-input circuit with only four rows → Three inputs need eight rows. With only four rows, half of the input combinations were never traced through the circuit.

Key Term

trace each row
Follow one row of input values through each gate in the circuit, write each gate's output in an extra column, then copy the final value of X into the truth table.

Fill in the Blanks

1. P = A AND B X = NOT P
Hint: Type the name of the extra column whose value is fed into the NOT gate.
2. A = 1, B = 0, C = 1 P = A AND B P = 0
Hint: Work out the output of the AND gate for this row and type that value.
3. Inputs: A, B, C Rows: 2 x 2 x 2 = 8
Hint: Type how many rows a three-input truth table needs.
4. P = 1 X = NOT P X = 0
Hint: Type the value that the final gate outputs, ready to copy into the X column.
5. P = 1, X = 0 X = NOT P
Hint: Type the gate name that turns the intermediate value into its opposite.

Spot the Error

Question 1
A X = (A OR B) OR C
B P = A AND B
C Row A=1 B=1 C=0: P = 1
D X = P OR C = 1
Line A — The circuit has an AND gate feeding the OR gate, so the expression must be X = (A AND B) OR C. Line 1 uses OR, which does not match the intermediate column P = A AND B.
Question 2
A Columns: A, B, X
B P = A OR B
C X = NOT P
Line A — The gate in the middle needs its own column. The table should have an extra column P (A, B, P, X) so the output of the OR gate can be written down before the NOT gate.
Question 3
A Row: A=1, B=1
B P = A AND B = 0
C X = NOT P = 0
Line B — An AND gate outputs 1 only when both inputs are 1. With A=1 and B=1, P = 1, not 0.
Question 4
A Row: A=0, B=1, C=1
B P = A OR B = 1
C Q = P AND C = 1
D X = NOT Q = 1
Line D — A NOT gate reverses its input. Q is 1, so X = NOT Q = 0, not 1.
Question 5
A X = A NOR B
B Row: A=0, B=1
C A NOR B = 1, so X = 1
D Copy 0 into the X column
Line C — A NOR gate outputs 1 only when both inputs are 0. Here B is 1, so the output is 0 and X = 0.

Student with a class code? Join your class →