Loading…
Loading…
Loading…
AQA GCSE Computer Science · 8525
AQA 8525 Check the specification (PDF) (opens in a new tab)
Boolean logic uses just two values: and . A applies a rule to its input values to produce an output. The letters A and B usually label inputs, while Q labels the output.
A truth table shows every possible input combination and the output produced for each one. It describes the gate's behaviour completely, rather than showing only one example.
To construct a truth table, first make a column for each input and a column for the output. List all the possible input combinations, then apply the gate's rule to each row separately.
A NOT gate has one input. Its output is always the opposite of that input: if A is 0, Q is 1; if A is 1, Q is 0.
There are only two possible input values, so its truth table has two data rows:
| Input A | Output Q: NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
For example, if A represents the statement ‘the door is open’, NOT A represents ‘the door is not open’. When the first statement is true, the second is false.
An AND gate has two inputs. It outputs 1 only when both inputs are 1. If either input is 0, the output is 0.
For two inputs, list the combinations in the order 00, 01, 10, 11. This systematic order ensures that no combination is missed or repeated.
| Input A | Input B | Output Q: A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Suppose a machine can run only when its safety guard is closed and its start button is pressed. Treat each satisfied condition as 1. The output is 1 only when both conditions are satisfied, matching the final row of the AND table.
An OR gate outputs 1 when at least one input is 1. This includes the case where both inputs are 1. Its output is 0 only when both inputs are 0.
| Input A | Input B | Output Q: A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
For example, an alarm could sound if sensor A detects movement or sensor B detects movement. Either sensor is enough to trigger it; both detecting movement still triggers it.
XOR means exclusive OR. It outputs 1 when exactly one input is 1: either A or B, but not both. Another way to express the rule is that XOR outputs 1 when the inputs are different.
| Input A | Input B | Output Q: A XOR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Compare this with OR. The two gates produce the same outputs for 00, 01 and 10. They differ at 11: OR accepts both inputs being true, whereas XOR excludes that case.
You can therefore construct each table from its rule rather than memorising isolated rows: NOT reverses, AND requires both, OR requires at least one, and XOR requires exactly one.
For two-input rows in that order, the output sequences are:
The crucial distinction: with inputs 11, OR outputs 1, while XOR outputs 0.
List every possible input combination before filling in the output column: 0 and 1 for NOT; 00, 01, 10 and 11 for a two-input gate.
Check the row where both inputs are 1: OR outputs 1, but XOR outputs 0.
When describing a truth table, explain that it shows every possible input combination and the corresponding output for each combination.
NAND and NOR gates are not required for this specification.
It can see this note and what your specification asks for.
Answers are free with an account.
1 free note left this week
Get more free notesYour answer sets when this note comes back for review, or marks it complete.
Was this note helpful?
Log in to tell us whether it helped, or to report a problem.
Last updated
Boolean logic
Logic in which a value has only two possible states: True (1) or False (0).
Logic gate
An electronic component that applies a Boolean rule to its input or inputs to produce an output.
Truth table
A table showing every possible combination of inputs and the corresponding output of a logic gate or Boolean expression.
NOT gate
A logic gate with one input that outputs the opposite value: 0 becomes 1 and 1 becomes 0.
AND gate
A logic gate that outputs 1 only when both inputs are 1.
OR gate
A logic gate that outputs 1 when at least one input is 1, including when both inputs are 1.
XOR gate
An exclusive OR logic gate that outputs 1 when its two inputs are different and 0 when they are the same.
Put your knowledge into practice — try past paper questions for Computer Science
Boolean logic
Logic in which a value has only two possible states: True (1) or False (0).
Logic gate
An electronic component that applies a Boolean rule to its input or inputs to produce an output.
Truth table
A table showing every possible combination of inputs and the corresponding output of a logic gate or Boolean expression.
NOT gate
A logic gate with one input that outputs the opposite value: 0 becomes 1 and 1 becomes 0.
AND gate
A logic gate that outputs 1 only when both inputs are 1.
OR gate
A logic gate that outputs 1 when at least one input is 1, including when both inputs are 1.
XOR gate
An exclusive OR logic gate that outputs 1 when its two inputs are different and 0 when they are the same.