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