← All teacher resources

Teaching the visible machine

Build Small Programs

Combine the instruction set into a game, buffer utility and job dispatcher.

Total classroom time: 135 minutes · 3 × 45 minutes

Learning outcomes

  • Combine input/rules/state into a target game.
  • Reverse a variable-length buffer through a stack.
  • Decompose a queued dispatcher into services.
  • Distinguish full register results from byte log values.

Before class

make anonymous target/guess examples and N=0 cases; prepare buffer sizes0..4 and job codes0(double),1(square),2(increment). Use a rubric and two cases before showing answer keys. Explain the final dispatcher is intentionally tiny and not a complete modern OS.

Three-session plan

Session 1: A Tiny Target Game · 45 minutes

Focus: three-round score game

Checkpoint: target 5/guesses5,2,5 produces 2 and no randomness/network is needed.

Session 2: A Stack-powered Buffer Utility · 45 minutes

Focus: input, push, pop, memory write and output phases

Checkpoint: 1,2,3,4 reverses to4,3,2,1; N=0 is empty.

Session 3: Your Own Mini Operating System · 45 minutes

Focus: queued service dispatch

Checkpoint: jobs(0,4),(1,3),(2,9) yield 8,9,10 and logs 64..66 match bytes.

Support and differentiation

plan phases in words and provide the unchanged service definitions; narrow to one job before the full queue.

Extend the thinking

test full results256,260,256 with byte logs 0,4,0; explain which abstraction each service hides.

Assessment evidence

independent design explanation, two varied passing fixtures including empty/boundary case, and trace-supported debugging record. A printed exact answer is a model, not the only correct solution.

Curriculum mapping notes

OpenKernel EDU aligns with concepts in the following frameworks. These connections support teacher planning. Check your current local grade or course expectations and assessment requirements when selecting activities.

Ontario

Coding and computational thinking in elementary mathematics; algorithms, programming, data representation and computer systems in secondary computer studies/digital technology contexts.

Units 1–3 address state/data/computers, 4–8 sequence/control/algorithm/debugging/representation, and 9–10 decomposition/systems/projects. Select actual grade/course expectations locally. This model does not establish coverage of all mathematical, digital citizenship, hardware-building or networking outcomes.

British Columbia

Applied Design, Skills and Technologies learning through designing, testing and refining solutions; secondary computer studies/programming concepts involving algorithms, data and computer systems.

Units 4–10 support iterative program design and explanation; units 1–3, 8 and 9 support data/state/system representation. Paper design, trace evidence and reflection make the process visible. Check current grade/course wording; not every ADST competency is covered.

Alberta

Computing science in applicable science/programming contexts; senior-high Career and Technology Studies Computing Science (CSE) concepts in algorithms, structured programs, data and systems.

Units 1–8 develop state, control and abstraction; units 9–10 apply decomposition and testing. Check the current program of studies and course requirements when deciding which activities suit your class.

Selected CSTA 2017 connections

These concept references use the CSTA 2017 framework. Check the current adopted edition and the full standard’s grade-level scope before using an identifier in a formal school mapping.

  • 1B-AP-10 — Sequences, events, loops and conditionals in programs. Aligns with units 1, 4, 5, 9 and 10. Simulated events are distinguished from a physical-device event system.
  • 2-AP-12 — Combinations of control structures in programs. Aligns with units 4–7 and 10 through decisions, loops and calls. Use the complete standard when planning work on compound conditionals or other nested control structures.
  • 2-AP-13 — Decomposing problems and subproblems into manageable parts. Aligns with units 6, 7, 9 and 10 through algorithm roles, reusable services and partitioned work.
  • 2-AP-14 — Reusable procedures and parameters for organizing code. Aligns with units 7 and 10. The VM uses register-passed input/result conventions, rather than high-level parameter declarations.
  • 2-AP-17 — Systematic testing and refining with a range of test cases. Aligns with checked challenges when paired with prediction, debugging explanations and varied cases. A pass alone does not demonstrate the complete standard.

Units 1–3, 8 and 9 also connect to the Computing Systems concept. Algorithm, state, debugging, abstraction and control describe the ideas taught in this resource; consult the local framework for its expectation names and scope.

Official source landing links

Use these official landing pages to check the current adopted edition and local grade or course expectations.