Proof: STORE Instruction Example 4

Let's prove the following theorem:

if the following are true:
  • instruction #0 is store src=5 addr=1 imm=1
  • the PC at time 0 = 0

then the PC at time 1 = 1

The following example shows that when a STORE instruction with src = 5, addr = 1, and imm = 1 is executed, the PC is incremented by 1.

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 #0 is store src=5 addr=1 imm=1
2 the PC at time 0 = 0
Proof Table
# Claim Reason
1 the PC at time (0 + 1) = 0 + 1 if instruction #0 is store src=5 addr=1 imm=1 and the PC at time 0 = 0, then the PC at time (0 + 1) = 0 + 1
2 0 + 1 = 1 0 + 1 = 1
3 the PC at time (0 + 1) = the PC at time 1 if 0 + 1 = 1, then the PC at time (0 + 1) = the PC at time 1
4 the PC at time 1 = 0 + 1 if the PC at time (0 + 1) = the PC at time 1 and the PC at time (0 + 1) = 0 + 1, then the PC at time 1 = 0 + 1
5 the PC at time 1 = 1 if the PC at time 1 = 0 + 1 and 0 + 1 = 1, then the PC at time 1 = 1

Comments

Please log in to add comments