GCSE · Computer Science · AQA · Spec 8525

Truth tables for logic circuits

Wire two gates together and the circuit might do nothing more than copy one input. Staring at the diagram won't show you that. A truth table will.

Computer Science · Logic circuits

One circuit, eight rows, two columns to fill

A and B go into an AND gate. Its output meets C at an OR gate, and out comes Q. Think of the table as a spreadsheet: one row for every possible set of inputs, one column for every wire.

Cover the last two columns with your hand and predict them for the highlighted row. Then press Next and check.

AND → ORQ = (A AND B) OR Cgate
ABCA AND BQ
00000
00101
01000
01101
10000
10101
11011
11111
A=0, B=0, C=0, A AND B=0 → Q = 0

Output

A=0 B=0 C=0  →  A AND B = 0  →  Q = 0

Step 1: Everything is 0. The AND gate needs both of its inputs to be 1, so A AND B is 0. The OR gate then sees 0 from the AND and 0 from C, so Q is 0.

1 / 8

Each row is worked left to right: the inputs, then the A AND B column, then Q. Q can only be worked out once the column before it is filled in.

Step 1 of 8: Everything is 0. The AND gate needs both of its inputs to be 1, so A AND B is 0. The OR gate then sees 0 from the AND and 0 from C, so Q is 0..

Watch out: Don't leap straight to Q. The OR gate needs the output of the AND gate, so that middle column has to exist first.

Computer Science · Listing every row

Why three inputs give eight rows

Walk down the tree: choose A, then B, then C. Then try a different path.

Input A → Input B → Input C

2 × 2 × 2 = 8 rows of the table, and the tree ends 8 times.

On Start. 2 branches to choose from.

Every input can be 0 or 1. Pick a value for A, then B, then C, and the path you walk is one row of the table.

Watch out: Read the ends from top to bottom and you get 000, 001, 010, 011 and so on: a binary count. Listing rows in that order is how you avoid missing one.

Computer Science · Order of working

What gets worked out first?

the order the parts of NOT A AND (B OR C) are worked out

1 · Worked out first3 · Worked out last
  1. NOT A

  2. The AND that joins the two sides

  3. (B OR C), the bracket

Watch out: Reading left to right feels natural, and it is the trap. Put these three parts in the order you would really work them out, then lock it in.

Computer Science · Your turn

Build a table from an expression

No circuit diagram this time, just the expression NOT A OR B. Complete its truth table by choosing the missing steps.

  1. Two inputs, so four rows. In binary counting order the (A, B) rows are 00, 01, 10, 11.
  2. NOT is worked out before OR, so NOT A gets a column of its own before the output column.
  3. missing step
Which line is step 3?

Predict, then check

Two gates, one tiny circuit. Make a prediction before you work it out, then see what the table says.

In the circuit A OR (A AND B), A goes straight into the OR gate and also into an AND gate with B. What do you predict this circuit does?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Every input combination, every gate in its own column, and the circuit's real behaviour at the end.

What you need to know

  • A truth table lists every possible combination of inputs, one per row, and the output each one gives.
  • AND gives 1 only when both inputs are 1. OR gives 1 when at least one input is 1. NOT flips its input.
  • Two inputs need 4 rows and three inputs need 8, because every new input doubles the number of rows.
  • Give each gate its own column, work the columns left to right, and write the final output column last.
  • Work an expression in this order: brackets, then NOT, then AND, then OR.

The big picture

A truth table is the complete record of what a logic circuit does. List every combination of inputs as a row, give each gate its own column, work the columns from left to right, and put the final output last.

Key points

1The table is the complete record of what a circuit does: all the rows, a column for every gate, and the output last.
2List the rows in binary counting order (00, 01, 10, 11 for two inputs) so that no combination is missed.
3Each column can only be worked out from the columns to its left, so the order is inputs, then gate columns, then the output.
4Brackets first, then NOT, then AND, then OR. A chain of the same gate, such as A OR B OR C, can be worked in any order.
5A finished table shows what a circuit really does, even when the diagram looks more complicated than it needs to be.

Worked example

Problem

Build the truth table for Q = NOT (A AND B).

⚠ Watch out

Jumping straight to the final output, or working an expression from left to right and missing rows. Instead list every combination in binary order, give each gate its own column, and follow brackets, NOT, AND, OR.

🧠

Memory hook

Think of a spreadsheet: one row for every possible set of inputs, one column for every wire. For the order of working, remember Be Neat And Orderly: Brackets, NOT, AND, OR.

✓

Check yourself

Pick a circuit with three inputs. Before you write a single output, can you say how many rows you need, what order they go in, and which column you will fill in first?

Flashcards

(12)
What does a truth table record?
Every possible combination of inputs for a circuit, and the output each combination gives.
How many rows does a truth table need for two inputs? For three?
4 rows for two inputs and 8 for three. Each extra input doubles the number of rows.
Why list the rows in binary counting order?
Counting 000, 001, 010, 011 and so on covers every combination once, so no row is missed.
AND gate rule
The output is 1 only when both inputs are 1. Otherwise it is 0.
OR gate rule
The output is 1 when at least one input is 1. It is 0 only when both inputs are 0.
NOT gate rule
It flips its one input: 0 becomes 1 and 1 becomes 0.
What is an intermediate column?
A column holding the output of one gate, which a later gate then uses as one of its inputs.
Which order are the columns of a truth table worked in?
Left to right: the inputs first, then each gate's column, then the final output column last.
In which order is an expression evaluated?
Brackets, then NOT, then AND, then OR.
Does the order matter in A OR B OR C?
No. A chain of the same gate can be worked in any order and gives the same result.
Why give every gate its own column instead of jumping to the output?
A later gate needs the earlier gate's output as its input, so that output has to be worked out and written down first.
What does a finished truth table tell you about a circuit?
What it really does. A circuit of two gates can turn out to simply copy one input, and only the table shows it.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 2 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.