Student worksheet

Byte Memory

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.

7. Memory: The Computer’s Notebook

Store and actually retrieve a byte after overwriting R0.

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.

LOAD 42
STORE 0
LOAD 99
STORE 1
LOAD 0
LOAD [0]
PRINT
LOAD [1]
PRINT
HALT

Queue input: None

Initialize memory: All bytes initially zero

InstructionPC beforePC afterR0 beforeR0 afterRelevant stateOutput
       
       
       

2. Build and check

Read a byte-valued input (0–255), save it at memory address 10, clear R0, then retrieve it from memory and print it.

Required instruction types: INPUT, STORE, LOAD

Starter program

INPUT
STORE 10
LOAD 0
# Read address 10 back.
HALT

Your program and notes

3. Explain the machine

Which code reads memory 10, and which loads the number10?