GCSE · Computer Science · AQA · Spec 8525
Truth tables for logic circuits
Wire two gates together and the circuit might just copy one input. Staring at the diagram won't show you that. A truth table will, every time.
Computer Science · Logic circuits
One circuit, eight rows, one column at a time
A and B go into an AND gate. Its output meets C at an OR gate, and out comes Q. Step through and watch every row get worked the same way: inputs, then the middle column, then Q.
The whole table is on show, so cover the last two columns with your hand. Predict them for the highlighted row, then press Next and check.
| A | B | C | A AND B | Q |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Output
Columns: A | B | C | A AND B | Q
Step 1: Before any numbers, label the gates. The AND gate's output is A AND B. The OR gate's output is Q = (A AND B) OR C. Those labels become your column headings, with Q as the last column.
Every row goes the same way: inputs → A AND B → Q. Q has to wait for the AND gate's answer.
Computer Science · Listing every row
Why three inputs make eight rows
Walk down the tree: choose A, then B, then C. Then try a different path and see where it lands.
Input A → Input B → Input C
2 × 2 × 2 = 8 rows of the table, and the tree ends 8 times.
Each input can only be 0 or 1. Pick a value for A, then B, then C. The path you walk is one row of the table.
Predict, then check
Two gates, one tiny circuit. Commit to a guess before you work anything out.
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 reckon this circuit does?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Every input combination, every gate in its own column, and what the circuit really does at the end.
What you need to know
- A truth table shows the output for every possible combination of inputs, one combination per row.
- Wire two or more gates together and you've got a logic circuit; a truth table is how you check what it does.
- Each input is 0 or 1, so every extra input doubles the rows: two inputs give 4, three give 8.
Have a goA circuit has four inputs. How many rows does its truth table need?
16
Each extra input doubles the rows, so three inputs' 8 becomes 16. Adding two rows per input would give 8, which misses half of them.
- Count in binary, 000, 001, 010, 011 and on, until the place values run out, and no row goes missing.
Have a goYour mate lists a three-input table as 000, 001, 010, 100, 101, 110, 111 and says "Done, all eight." Are they right?
No. That's only seven rows: 011 is missing.
Counting in binary goes 010, 011, 100. Jumping about instead of counting is exactly how a row slips through, and it's easy to miscount and not notice.
- Starting from a circuit diagram? Label each gate's output first; those labels become columns, with the final output last.
- Intermediate columns hold part of the expression, like A AND B, which makes the final output easier to work out.
- Starting from an expression? Work brackets first, then NOT, then AND, then OR.
Have a goIn A OR B AND C, which gate do you work out first?
The AND: B AND C.
AND comes before OR, even though the OR is written first. Working left to right would give a different table.
- Chain the same gate, like A OR B OR C, and the order doesn't matter.
- AND needs both inputs at 1. OR needs either or both. XOR needs either but not both. NOT flips 0 and 1.
- Finally, read the output column against the inputs: it tells you whether the circuit does what was intended.
The big picture
A truth table shows a circuit's output for every possible combination of inputs. Count in binary to list the rows, label each gate's output and give it a column, work brackets, NOT, AND, then OR, and put the final output last. Then read what the circuit really does.
Key points
Worked example
Problem
Build the truth table for Q = A XOR (B AND C).
⚠ Watch out
Jumping straight to the final output, or working an expression left to right. Both look quicker and both go wrong. List every combination by counting in binary, give each gate its own column, and follow brackets, NOT, AND, OR.
Memory hook
Think spreadsheet: one row for every possible set of inputs, one column for every gate's output. For the order of working, Be Neat And Orderly: Brackets, NOT, AND, OR.
Check yourself
Grab any three-input circuit. Before you write a single output, can you say how many rows you need, what order they go in, and which column you'll fill in first?
Flashcards
(14)What does a truth table show?
What is a logic circuit?
How many rows for two inputs? For three?
Why list the rows by counting in binary?
AND gate rule
OR gate rule
XOR gate rule
NOT gate rule
What is an intermediate column, and why bother with one?
Truth table from a circuit diagram: what's the very first job?
In which order is an expression evaluated?
Q = NOT (A AND B). For which inputs is Q 0?
Does the order matter in A OR B OR C?
What does a finished truth table tell you about a circuit?
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 postedMore AQA GCSE Computer Science topics
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 26 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.