Single lesson · Key Stage 3

Writing LMC programs – Year 9 Computing lesson

Pupils learn to write and trace LMC programs using INP, OUT, LDA, STA, ADD, SUB and HLT, recording the accumulator.

Also in a bundle Inside the CPU – Year 9 Computing lessons 6 lessons for £20 · save 16% on buying separately

Lesson 3 of 6 in unit 9.4 Inside the CPU, taught in Year 9, Spring 2. It answers one big question: How does the accumulator help the CPU carry out a program?

By the end, pupils can write and trace LMC programs using INP, OUT, LDA, STA, ADD, SUB and HLT, recording the accumulator.

The Build (the main task)
Write an LMC program that inputs two app sizes in MB, outputs the total and stores it, then trace it with 300 and 250.
Support version
Parsons problem: the program's lines are jumbled, with one extra line that uses LDA where STA is needed.
Challenge
Extend the program to subtract the total from the 900 MB of free space (stored with DAT) and output how much space is left.
Real-world link
Before installing apps a phone checks it has room; today pupils write the low-level program that adds up two apps' sizes.
Key words
Accumulator (ACC), Mnemonic and Step, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“The accumulator holds the address of the next instruction”; “STA copies a value from memory into the accumulator”.
National Curriculum
NC6 (how instructions are stored and executed; text, sound and pictures as binary); NC4 (boolean logic (AND, OR, NOT) in circuits and programming; binary numbers, addition and conversion).

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.

Pupils need computers for the main task.

Also sold in the Inside the CPU 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 all

Written for the specifications named. Not endorsed by or affiliated with any exam board.