Computers process data using logic gates — electronic components that perform Boolean operations. Each gate takes binary inputs (0 = FALSE, 1 = TRUE) and produces a single binary output. The Edexcel 4CP0 specification requires knowledge of three gates: AND, OR, and NOT.
Output is 1 only when ALL inputs are 1. If any input is 0, output is 0.
Expression: Q = A AND B
| A | B | Q (A AND B) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Real-world analogy: A door opens only if both conditions are met (e.g. correct card AND correct PIN).
Output is 1 when at least one input is 1. Output is 0 only when ALL inputs are 0.
Expression: Q = A OR B
| A | B | Q (A OR B) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Real-world analogy: An alarm triggers if either the window sensor OR the door sensor is triggered.
The NOT gate has one input and inverts it. 1 becomes 0, and 0 becomes 1. Also called an inverter.
Expression: Q = NOT A
| A | Q (NOT A) |
|---|---|
| 0 | 1 |
| 1 | 0 |
Real-world analogy: If a light is ON, NOT turns it OFF. If it is OFF, NOT turns it ON.
Gates can be combined into circuits. Work through each gate in sequence to find the final output.
Example: Q = (A AND B) OR (NOT C)
To complete the truth table: first evaluate A AND B, then evaluate NOT C, then OR the two results together.
| A | B | C | A AND B | NOT C | Q |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |