Proof: Pc 23

Let's prove the following theorem:

if the following are true:
  • instruction #5 is addi dst=1 src=2 imm=0
  • the PC at time 23 = 5

then the PC at time 24 = 6

Instructions
Memory Cells
Program Counter Time
0 0
LW Computer Simulator

Proof:

View as a tree | View dependent proofs | Try proving it

Given
1 instruction #5 is addi dst=1 src=2 imm=0
2 the PC at time 23 = 5
Proof Table
# Claim Reason
1 the PC at time (23 + 1) = 5 + 1 if instruction #5 is addi dst=1 src=2 imm=0 and the PC at time 23 = 5, then the PC at time (23 + 1) = 5 + 1
2 23 + 1 = 24 23 + 1 = 24
3 5 + 1 = 6 5 + 1 = 6
4 the PC at time (23 + 1) = the PC at time 24 if 23 + 1 = 24, then the PC at time (23 + 1) = the PC at time 24
5 the PC at time 24 = 6 if the PC at time (23 + 1) = 5 + 1 and the PC at time (23 + 1) = the PC at time 24 and 5 + 1 = 6, then the PC at time 24 = 6
Previous Lesson

Comments

Please log in to add comments