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