Proof: Pc 10
Let's prove the following theorem:
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2 - the PC at time 10 = 4
then the PC at time 11 = 5
Instructions
| Memory Cells |
|---|
| Program Counter | Time |
|---|---|
| 0 | 0 |
LW Computer Simulator
Proof:
Given
| 1 | instruction #4 is add dst=3 src1=1 src2=2 |
|---|---|
| 2 | the PC at time 10 = 4 |
| # | Claim | Reason |
|---|---|---|
| 1 | the PC at time (10 + 1) = 4 + 1 | if instruction #4 is add dst=3 src1=1 src2=2 and the PC at time 10 = 4, then the PC at time (10 + 1) = 4 + 1 |
| 2 | 10 + 1 = 11 | 10 + 1 = 11 |
| 3 | 4 + 1 = 5 | 4 + 1 = 5 |
| 4 | the PC at time (10 + 1) = the PC at time 11 | if 10 + 1 = 11, then the PC at time (10 + 1) = the PC at time 11 |
| 5 | the PC at time 11 = 5 | if the PC at time (10 + 1) = 4 + 1 and the PC at time (10 + 1) = the PC at time 11 and 4 + 1 = 5, then the PC at time 11 = 5 |
Comments
Please log in to add comments