Try out the example in the simulator:
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
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:
- Looks up memory cell #1 and finds 3
- Adds 1 to 3, which is 4.
- Copies the value in memory cell #4 (9) to memory cell #5.
Quiz (1 point)
load dst=5 addr=1 imm=1
- 3 + 1 = 4
- 0 + a = a
if the following are true:
- instruction #i is
load dst=dst addr=addr imm=imm
- the PC at time t = i
then value of cell dst at time (t + 1) = value of cell ((value of cell addr at time t) + imm) at time t
- instruction #i is
if value of cell 1 at time 0 = 3, then (value of cell 1 at time 0) + 1 = 3 + 1
if the following are true:
- a = b
- b = c
then a = c
if (value of cell 1 at time 0) + 1 = 4, then value of cell ((value of cell 1 at time 0) + 1) at time 0 = value of cell 4 at time 0
if the following are true:
- a = b
- b = c
then a = c
if the following are true:
- a = b
- b = c
then a = c
if 0 + 1 = 1, then value of cell 5 at time (0 + 1) = value of cell 5 at time 1
if the following are true:
- a = b
- a = c
then b = c
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.