Cover lesson · Computer Science · Year 10 · Intermediate
DCF: Data and computational thinking → Problem-solving and modelling
Name: Class: Date:
Print: this sheet, one per pupil. Everything needed is on it, including a reference table of what each gate does. Rulers are useful for the circuit diagram; nothing else is.
Run: 5 min read the gate reference table · 25 min scenarios A to D, one Boolean expression and one truth table each · 10 min scenario E, the three-input one, plus its circuit diagram · 10 min the "find the fault" question.
Collect: this sheet. Every truth table has exactly one correct set of output values and they are all printed on the worked example sheet, so marking is a tick-and-compare job.
Logic gates are not only inside processors. They are the rule behind a car light, a microwave door, a fire alarm and a landing light. For each of five real situations you will name the inputs, write the situation as a Boolean expression, and complete the truth table that proves your expression behaves the way the real device does.
1 means true, on, pressed or detected. 0 means false, off, not pressed or not detected.
| Gate | Output is 1 when… | Behaviour for inputs 00, 01, 10, 11 |
|---|---|---|
| AND | both inputs are 1 | 0, 0, 0, 1 |
| OR | at least one input is 1 | 0, 1, 1, 1 |
| NOT | the single input is 0 | NOT 0 = 1, NOT 1 = 0 |
| XOR | exactly one input is 1 | 0, 1, 1, 0 |
| NAND | the inputs are not both 1 | 1, 1, 1, 0 |
The light inside a car comes on if the driver's door is open, or the passenger door is open, or both.
Inputs: D = _______________________ P = _______________________
Expression: L = _______________________
| D | P | L (light on) |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
The microwave only heats when the door is closed and the timer is running. If either is not true, nothing happens.
Expression: M = _______________________
| C (door closed) | T (timer running) | M (heating) |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
Why is it important that this is AND and not OR?
The sounder goes off when smoke is detected, unless a member of staff is holding the silence button down during a test.
Expression: A = _______________________
| S (smoke) | T (silence held) | NOT T | A (sounder) |
|---|---|---|---|
| 0 | 0 | ||
| 0 | 1 | ||
| 1 | 0 | ||
| 1 | 1 |
There is a switch at the bottom of the stairs and one at the top. Flicking either switch changes the light: if it was on it goes off, if it was off it comes on. Both switches down means off; both up also means off.
Expression: L = _______________________
| A (bottom switch up) | B (top switch up) | L (light on) |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
The school's polytunnel has an extractor fan. It runs automatically when it is hotter than 28°C and the window is closed — there is no point extracting air through an open window. The gardener can also force it on with an override button at any time.
Inputs: H = hotter than 28°C W = window closed O = override pressed. Output: F = fan runs.
Expression: F = _______________________
| H | W | O | H AND W | F |
|---|---|---|---|---|
| 0 | 0 | 0 | ||
| 0 | 0 | 1 | ||
| 0 | 1 | 0 | ||
| 0 | 1 | 1 | ||
| 1 | 0 | 0 | ||
| 1 | 0 | 1 | ||
| 1 | 1 | 0 | ||
| 1 | 1 | 1 |
Draw the circuit: two gates, three input lines on the left labelled H, W and O, one output on the right labelled F.
An electrician wires the fire alarm from scenario C as A = S OR (NOT T) instead. Fill in the table, then say in one sentence what the caretaker will experience on a normal quiet afternoon.
| S | T | NOT T | A = S OR (NOT T) |
|---|---|---|---|
| 0 | 0 | ||
| 0 | 1 | ||
| 1 | 0 | ||
| 1 | 1 |