Try out the example in the simulator:

Instructions
Memory Cells
Program Counter Time
0 0
LW Computer Simulator

The following example shows that when a LOAD instruction with dst = 5, addr = 1, and imm = 1 is executed, the computer performs the following actions:

  1. Looks up memory cell #1 and finds 3
  2. Adds 1 to 3, which is 4.
  3. Copies the value in memory cell #4 (9) to memory cell #5.

Quiz (1 point)

Given that:
instruction #0 is load dst=5 addr=1 imm=1
the PC at time 0 = 0
value of cell 1 at time 0 = 3
value of cell 4 at time 0 = 7

Prove that:
value of cell 5 at time 1 = 7

The following properties may be helpful:

Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.

Step Claim Reason (optional) Error Message (if any)
1
2
3
4
5
6
7
8
9
10

Become a subscriber to save your progress, see the correct answer, and more!