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