This proof shows that an ADD instruction that stores the sum in memory cell #2 does not affect memory cell #1. It uses ADD Instruction Property 2 and performs some basic algebra to compute the value of memory cell #1 at time 1.
Note that src1 and src2 are left as variables because these values do not affect memory cell #1. In other words, this property is true regardless of the value of src1 and src2.
For reference, here is the simulator. We cannot use variable values so src1 is set to 1 and src2 is 2:
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
Quiz (1 point)
add dst=2 src1=src1 src2=src2
- not (1 = 2)
- 0 + a = a
if the following are true:
- instruction #i is
add dst=d src1=s1 src2=s2
- the PC at time t = i
- not (other = d)
then value of cell other at time (t + 1) = value of cell other at time t
- instruction #i is
if 0 + 1 = 1, then value of cell 1 at time (0 + 1) = value of cell 1 at time 1
if the following are true:
- a = b
- a = c
- b = d
then c = d
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.