Try out the example in the simulator:
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
The computer copies the value in memory cell #5 (9) to cell #4. The destination is calculated by adding the value in cell #1 (3) and the immediate (1).
Quiz (1 point)
store src=5 addr=1 imm=1
- 0 + a = a
- 3 + 1 = 4
if the following are true:
- instruction #i is
store src=src addr=addr imm=imm
- the PC at time t = i
then value of cell ((value of cell addr at time t) + imm) at time (t + 1) = value of cell src at time t
- instruction #i is
if 0 + 1 = 1, then value of cell ((value of cell 1 at time 0) + 1) at time (0 + 1) = value of cell ((value of cell 1 at time 0) + 1) at time 1
if value of cell 1 at time 0 = 3, then (value of cell 1 at time 0) + 1 = 3 + 1
if (value of cell 1 at time 0) + 1 = 3 + 1, then value of cell ((value of cell 1 at time 0) + 1) at time 1 = value of cell (3 + 1) at time 1
if 3 + 1 = 4, then value of cell (3 + 1) at time 1 = value of cell 4 at time 1
if the following are true:
- a = b
- b = d
- a = c
then d = c
if the following are true:
- a = b
- b = c
then a = c
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.