From Python conditions to AND, OR and NOT gates – Year 8 Computing lesson
How does a circuit make a decision like an if statement? One complete Year 8 Computing lesson with slides, worksheets and a lesson plan.
Lesson 3 of 6 in unit 8.2 Boolean Logic and Circuits, taught in Year 8, Autumn 2. It answers one big question: How does a circuit make a decision like an if statement?
By the end, pupils can match Python's and, or and not to AND, OR and NOT gates, recognise each gate's symbol, write each gate as a Boolean expression and give its output for inputs of 1 and 0.
- The Build (the main task)
- Identify the gate for each of four devices, type its Boolean expression (Q = …), write the matching Python condition and give the output for the inputs shown.
- Support version
- Part-filled gate cards: the gate symbols are drawn and the Python keywords are given in a word bank; pupils choose the gate, label it and give the output.
- Challenge
- Explain why the bike-store alarm should use AND, not OR, for 'alarm set' and 'door open'.
- Real-world link
- A lift moves only if the door is shut AND a button is pressed; a doorbell rings if the front OR back button is pressed.
- Key words
- Logic gate, Boolean logic and Signal, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “An OR gate gives 0 when both inputs are 1, because OR means one or the other but not both”; “An AND gate adds its inputs, so 1 AND 1 = 2”.
- National Curriculum
- NC4 (boolean logic (AND, OR, NOT) in circuits and programming; binary numbers, addition and conversion); NC6 (how instructions are stored and executed; text, sound and pictures as binary).
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Also sold in the Boolean Logic and Circuits unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
More for KS3 Computing
See allPupils learn to use pattern recognition, decomposition and step-by-step reasoning to solve Bebras-style logic puzzles and explain their method.
Free sample lessonPupils learn to complete the 45-minute UK Bebras Challenge (Intermediates) on their own, choosing a strategy for each task.
Free sample lessonPupils learn to complete truth tables for AND, OR and NOT and for a Boolean expression that combines two gates, listing every input combination.
Written for the specifications named. Not endorsed by or affiliated with any exam board.