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