Student worksheet

Meet the Machine

Three lesson sections: predict, build, explain. Work on paper or in the local lab. No name, account or student record is requested by the app.

1. Your First Emoji Program

Move a number into the CPU, print it, and stop.

Open this lesson →

1. Predict and trace

Before running the Try program, predict its output and trace the first three executed instructions. Track the relevant registers, flags or memory as needed. Then step the program to compare.

📥 42
🖨️
⏹️

Queue input: None

Initialize memory: All bytes initially zero

InstructionPC beforePC afterR0 beforeR0 afterRelevant stateOutput
       
       
       

2. Build and check

Write a program that prints 42 exactly once and halts. Use LOAD, PRINT, and HALT.

Required instruction types: LOAD, PRINT, HALT

Starter program

# Put 42 in R0, print it, then stop.
HALT

Your program and notes

3. Explain the machine

What is in R0 and output just before PRINT? What PC does HALT leave?