Turn a yes-or-no condition into a signal
Suppose an exhibit cabinet has a door sensor. A means 'the door is open'. A = 1 means that statement is true; A = 0 means it is false. A is one Boolean input: it has two possible values, not a measurement of how far the door is open.
A logic gate applies a fixed rule to its input signal or signals and produces one output signal. The same input combination always gives the same output for that gate. Read the rule before trying to predict the output.
In a truth table, every row is a separate possible situation. A zero is a known false value. An empty output cell means 'not filled in yet', not false.
NOT reverses one input
NOT A asks for the opposite of A. When the cabinet door is closed, A = 0, so NOT A = 1: 'the door is not open' is true. When the door is open, A = 1 and NOT A = 0.
A NOT gate has one input. Its diagram uses a triangle with a small circle at the output. The circle indicates inversion: changing 0 to 1 and 1 to 0. It is not a second input or an extra Boolean value to add.
| A: door open | NOT A: door not open |
|---|---|
| 0 | 1 |
| 1 | 0 |
AND needs both conditions
The cabinet also has nearby-movement input B and armed input C. B = 1 means movement is detected; C = 1 means the warning system is armed. A movement warning should be active only when both statements are true, so this part of the rule is B AND C.
For B = 1 and C = 0, movement is detected but the system is not armed. The output is 0. For B = 1 and C = 1, both conditions hold, so the output is 1. One true input is not enough.
The AND symbol has a flat input side and a rounded output side. Two input wires enter the flat side; one output leaves the rounded side. The shape names a rule, not a physical doorway through which the values pass.
| B: movement | C: armed | B AND C |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR includes the case where both inputs are 1
Now look at the two sensor readings: A means door open and B means nearby movement. A OR B asks whether at least one sensor reports its condition. Inputs 01 and 10 both produce 1. Inputs 11 also produce 1: 'at least one' allows both.
Only 00 produces 0, because neither condition is true. This is inclusive OR. It does not mean 'one, but not both', and it does not add the inputs to produce 2.
The OR symbol has a curved input side and narrows to a point at its output. Follow the two input wires to the gate and the single output wire away from it.
| A | B | A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
List every combination once
One input has two possibilities: 0 and 1. With two inputs, pair each A value with both B values: 00, 01, 10, 11. That gives four rows. The rightmost input changes on every row; the leftmost changes after two rows.
With three inputs, the eight combinations are 000, 001, 010, 011, 100, 101, 110 and 111. Each added Boolean input doubles the possibilities. Do not omit 000: all inputs being false is still a valid situation to test.
Keep a ruler-like focus on one row. Read its inputs, apply the named gate's rule, then enter that row's output. Do not carry an output from the previous row into the next situation.
| A | B | A AND B | A OR B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
AQA focus
AQA: XOR detects different inputs
XOR, exclusive OR, produces 1 when its two inputs differ. Suppose a fault indicator should light when two readings disagree. Readings 01 and 10 activate it; 00 and 11 do not. That is a different requirement from 'at least one reading is 1'.
Compare OR and XOR on input 11. OR gives 1 because at least one input is true. XOR gives 0 because the two inputs are the same. This one row distinguishes their rules; both give 1 on 01 and 10.
The XOR gate symbol resembles OR but has an extra curved line beside the input side. AQA requires XOR in both supported specification editions. OCR J277's required gate set here is NOT, AND and OR.
| A | B | A OR B | A XOR B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 |
Continue with your exam board
The course combines lesson videos, interactive activities, topic questions and original exam mocks. Sign in to use the learning tools and save your progress; your account’s course access applies.
Independent learning resources. Not endorsed by AQA or OCR. These public introductions complement the full course and the official specification.