The program is shown on the simulator below:

Instructions
Memory Cells
Program Counter Time
0 0
LW Computer Simulator

We are given the program instructions and the PC at time 0. We use this information to make claims about the program's state at time 1. For example:

Then we use the claims about time 1 to prove claims about time 2, and so on. Eventually, at time 14, we prove that memory cell #5 stores 21 and the program terminates.

Quiz (1 point)

Given that:
the PC at time 0 = 0
instruction #0 is addi dst=3 src=0 imm=3
instruction #1 is addi dst=4 src=0 imm=0
instruction #2 is addi dst=5 src=0 imm=0
instruction #3 is addi dst=5 src=5 imm=7
instruction #4 is addi dst=4 src=4 imm=1
instruction #5 is beq left=3 right=4 imm=1
instruction #6 is jump imm=3

Prove that:
value of cell 5 at time 14 = 21

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!