The following example shows that when a LOAD instruction with dst = 5, addr = 1, and imm = 0 is executed, the computer looks up memory cell #1 and finds 3, then copies the value memory cell #3 (9) to memory cell #5. imm is 0 so the source address is unchanged.
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
Quiz (1 point)
load dst=5 addr=1 imm=0
- a + 0 = a
- 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) + 0 = 3 + 0
if the following are true:
- a = b
- b = c
then a = c
if (value of cell 1 at time 0) + 0 = 3, then value of cell ((value of cell 1 at time 0) + 0) at time 0 = value of cell 3 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.