Proof: Byte 4 Stays the Same 24
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 24 = 6
- value of cell 4 at time 24 = 3
then value of cell 4 at time 25 = 3
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 24 = 6 | 
| 3 | value of cell 4 at time 24 = 3 | 
| # | Claim | Reason | 
|---|---|---|
| 1 | not (4 = 2) | not (4 = 2) | 
| 2 | value of cell 4 at time (24 + 1) = value of cell 4 at time 24 | if instruction #6 is addi dst=2 src=3 imm=0and the PC at time 24 = 6 and not (4 = 2), then value of cell 4 at time (24 + 1) = value of cell 4 at time 24 | 
| 3 | 24 + 1 = 25 | 24 + 1 = 25 | 
| 4 | value of cell 4 at time (24 + 1) = value of cell 4 at time 25 | if 24 + 1 = 25, then value of cell 4 at time (24 + 1) = value of cell 4 at time 25 | 
| 5 | value of cell 4 at time 25 = value of cell 4 at time 24 | if value of cell 4 at time (24 + 1) = value of cell 4 at time 25 and value of cell 4 at time (24 + 1) = value of cell 4 at time 24, then value of cell 4 at time 25 = value of cell 4 at time 24 | 
| 6 | value of cell 4 at time 25 = 3 | if value of cell 4 at time 25 = value of cell 4 at time 24 and value of cell 4 at time 24 = 3, then value of cell 4 at time 25 = 3 | 
Comments
Please log in to add comments