Proof: Byte 2 Stays the Same 15
Let's prove the following theorem:
if the following are true:
- instruction #9 is
jump imm=(-6)
- the PC at time 15 = 9
- value of cell 2 at time 15 = 2
then value of cell 2 at time 16 = 2
Instructions
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
LW Computer Simulator
Proof:
Given
1 | instruction #9 is jump imm=(-6) |
---|---|
2 | the PC at time 15 = 9 |
3 | value of cell 2 at time 15 = 2 |
# | Claim | Reason |
---|---|---|
1 | value of cell 2 at time (15 + 1) = value of cell 2 at time 15 | if instruction #9 is jump imm=(-6) and the PC at time 15 = 9, then value of cell 2 at time (15 + 1) = value of cell 2 at time 15 |
2 | 15 + 1 = 16 | 15 + 1 = 16 |
3 | value of cell 2 at time (15 + 1) = value of cell 2 at time 16 | if 15 + 1 = 16, then value of cell 2 at time (15 + 1) = value of cell 2 at time 16 |
4 | value of cell 2 at time 16 = value of cell 2 at time 15 | if value of cell 2 at time (15 + 1) = value of cell 2 at time 16 and value of cell 2 at time (15 + 1) = value of cell 2 at time 15, then value of cell 2 at time 16 = value of cell 2 at time 15 |
5 | value of cell 2 at time 16 = 2 | if value of cell 2 at time 16 = value of cell 2 at time 15 and value of cell 2 at time 15 = 2, then value of cell 2 at time 16 = 2 |
Comments
Please log in to add comments