The six logic gates. NOT · AND · OR · NAND · NOR · XOR. The symbol, truth table and logic expression for each one — before you join them into circuits.
Every digital device you own processes data as electrical signals that are either high (1) or low (0) — two states. Logic gates are the tiny switches that combine those signals. They are the building blocks of computation.
In this lab you'll meet the six logic gates in the Cambridge 0478 syllabus: NOT · AND · OR · NAND · NOR · XOR. For each one you'll learn the symbol, the behaviour, the truth table, and how to write it as a logic expression.
This is the gates lab. The Composition Lab joins gates into circuits, and the Problem Statements Lab turns real-world rules into circuits. Both build on knowing these six gates well.
"The gate fires. The signal responds." Each gate is a switch. You put signals in. You get a signal out. Every gate has its own rule for which combinations of inputs turn the output high.
X = A AND BShort definitions to learn — clear wording helps in written answers.
Every gate has three things you need to recognise:
X = A AND BTruth tables show all four (or two, for NOT) input combinations and the output for each.
NOT has 1 input. Only one. Ever.
All other gates (AND, OR, NAND, NOR, XOR) have 2 inputs.
The syllabus says it directly: NOT is a single-input gate; all other gates are limited to two inputs. A NOT gate drawn with two inputs is not a valid gate.
| Gate | Inputs | Output = 1 when… | Logic expression |
|---|---|---|---|
| NOT | 1 | input is 0 | X = NOT A |
| AND | 2 | both inputs are 1 | X = A AND B |
| OR | 2 | either or both inputs are 1 | X = A OR B |
| NAND | 2 | either input is 0 (or both) | X = A NAND B |
| NOR | 2 | both inputs are 0 | X = A NOR B |
| XOR | 2 | exactly one input is 1 | X = A XOR B |
A.B, OR as A + B and NOT as a bar over the letter. You may meet these elsewhere, but in this course write logic expressions in words, using the gate names: X = A AND B, X = NOT A, X = A NOR B.Each gate as a doorway guard. Different guards, different rules — remember the guard's rule, remember the gate.
Some of these are noted in Cambridge examiner reports; the rest come from the syllabus and good exam habits. Every one has a fix.
Clear, precise wording for gate questions.
X = A NOR B or X = NOT (A OR B) — use brackets when NOT applies to more than one input0 / 6 revealed
You can draw the symbol, complete the truth table, and write the logic expression for any single gate in isolation.
Next up: the Composition Lab — where you'll join these gates into circuits with up to three inputs, and move between logic expressions, truth tables and circuits.
📍 10.1–10.7 Gates Lab (this page)
10.8–10.10 Composition Lab
10.11 Problem Statements Lab
Next: Topic 11 Programming Scenarios
Covers Cambridge 0478 Topic 10, outcomes 1 and 2: the standard symbols for NOT, AND, OR, NAND, NOR and XOR (EOR), and the function of each gate. NOT has one input; the other gates have two. It also starts outcome 3 — truth tables and logic expressions, here for a single gate.
The Learn tab takes the six gates and slows them down. Each one gets a diagram, an explanation, and a walk-through of its behaviour. When you're done here, head to Activities and open the Gate Trainer.
Every gate symbol has three parts you draw:
1 · Input lines — one for NOT, two for all other gates. Labelled A (and B, for 2-input gates).
2 · The body — the shape of the gate. AND has a flat back and a D-shaped front. OR has a curved back and a pointed front. NOT is a triangle.
3 · The output line — labelled X. If the gate is a "NOT-something" (NAND, NOR, or NOT itself), there's a small bubble at the output tip.
The difference between AND and NAND is one small circle. That circle inverts every output.
Output = 1 when both inputs are 1.
| A | B | X |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Output = flipped AND. Both 1s gives 0; anything else gives 1.
| A | B | X |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The rule: every N-gate (NAND, NOR, NOT) has an output bubble. No bubble, no inversion — it's a different gate. This is Trap 5 in the Review tab.
Same layout for every gate: symbol · rule · truth table · logic expression.
2-input truth tables always show the same four rows, always in the same order:
| A | B | X |
|---|---|---|
| 0 | 0 | ? |
| 0 | 1 | ? |
| 1 | 0 | ? |
| 1 | 1 | ? |
Read down A first, then B. A = 0, B = 0. A = 0, B = 1. A = 1, B = 0. A = 1, B = 1. It counts up in binary. Use this order every time, so you never miss or repeat a row.
2 inputs → 4 rows. 1 input (NOT) → 2 rows. In the Composition Lab, 3 inputs → 8 rows.
The Gate Trainer has 4 modes. Symbol → Name (easiest) walks up to Sprint (hardest). Start on Mode 1 — gates you get wrong come back more often.
This lab covers these parts of the Topic 10 syllabus:
Not in this lab (Composition and Problem Statements Labs): circuits with more than one gate, moving between circuits, expressions and truth tables, and problem statements.
Four modes. Each one drills a different gate skill. Gates you get wrong come back more often; gates you've mastered appear less.
Sprint is 60 seconds of mixed drills. It unlocks once you've answered at least one drill in each of Modes 1, 2 and 3. Sprint is for speed — it doesn't change your Mastery.
Mixed drills from Modes 1–3. Weak gates come up more often. Streaks show at 5 · 10 · 15 correct. Sprint answers don't change your Mastery.
Answers from Modes 1–3, Practice and Exam. Weak gates come up more often.
Mode 1 · Symbol → Name. See the symbol, name the gate. Trains symbol recognition.
Mode 2 · Name → Truth Table. See "XOR", fill in the output column in order. Trains truth tables.
Mode 3 · Inputs → Output. See gate + specific A/B, predict X. Trains gate-behaviour recall.
Mode 4 · Sprint. 60s mixed drill for speed. Each drill in Modes 1–3 counts once towards Mastery; Sprint doesn't count.
Gates you get wrong come back more often. Filter by difficulty or run the whole pool. Missed questions are saved to Mistakes.
Paper 2 style questions on single gates. Answer every part, then press Mark my answer — truth tables, tick tables, symbols, gate names and logic expressions are checked automatically, and written answers are checked for the key points.
Written in the style of Cambridge Paper 2 (Algorithms, Programming and Logic), where Boolean logic is assessed. In the real exam you draw gate symbols — practise drawing each one on paper, then use the symbol questions here to check you can recognise them.
Common mistakes on logic gates — some of them noted in Cambridge examiner reports. Read these before your exam. Then look at Mistakes to see the ones you make.
Six one-liners. If you can recite these before your exam, you know the six gates.
Tick each item as you master it. In the skill grid, tap a status chip to set it yourself. When all 12 are ticked, the Module Mastered banner unlocks.
Mastered = 3+ attempts and ≥70% accuracy. Tap the status chip to manually override.
Join gates into circuits with up to three inputs, and move between logic expressions, truth tables and circuits.
📍 10.1–10.7 Gates Lab (this page)
10.8–10.10 Composition Lab
10.11 Problem Statements Lab
Next: Topic 11 Programming Scenarios
Every wrong Practice/Exam answer captures here automatically. Review before your next attempt.
Your attempts, accuracy and mastery counts in the Gates Lab.
Star an exam question to save it here.
Jot notes as you learn. Everything here is saved on this device only.
Sent mistakes, saved concepts, and things you want to keep. Search across everything.