AND, OR, NOT — the basics
Three gates that do everything else can be built from.
AND gate. Output is 1 ONLY when BOTH (or all) inputs are 1.
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Real-world example: 'Coffee maker turns on when (water tank is full) AND (power switch is on)'.
OR gate. Output is 1 if AT LEAST ONE input is 1.
| A | B | A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Real-world example: 'Doorbell rings when (front door pressed) OR (back door pressed)'.
NOT gate. SINGLE input. Output INVERTS the input.
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
Real-world example: 'Light comes on when it is NOT daytime'.
Cambridge tip. Always show truth tables row-by-row. Mark scheme awards method marks even for partial answers.
- AND: 1 only if both inputs 1.
- OR: 1 if at least one input 1.
- NOT: inverts a single input.