After the following program is executed, cell #3 will contain the 6th Fibonacci number (5).
We need at least 2 numbers before we can calculate sums, so we start with 0 and 1. But notice that 5 is the sum of the two previous numbers 2 and 3.
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
Memory cell #1 contains the nth Fibonacci number (initially the 1st Fibonacci number 0).
Cell #2 contains the n + 1th Fibonacci number (initially the 2nd Fibonacci number 1).
Memory cell #4 contains the current count or index.
Cell #5 contains 4. In each iteration, the computer will increment #4 and finish when it reaches the value in cell #5.
The computer computes the next Fibonacci number by adding values in cells #1 and #2 and storing it in cell #3. Then, to prepare for the next iteration, the values are "moved down" 1: cell #2 is copied to cell #1 and cell #3 is copied to cell #2.
Then the counter increments by 1, and the computer jumps back to instruction #4, and the next iteration begins.
At the end of the program, cell #3 contains the 6th Fibonacci number.
Quiz (1 point)
addi dst=1 src=0 imm=0
addi dst=2 src=0 imm=1
addi dst=4 src=0 imm=0
addi dst=5 src=0 imm=4
add dst=3 src1=1 src2=2
addi dst=1 src=2 imm=0
addi dst=2 src=3 imm=0
addi dst=4 src=4 imm=1
beq left=4 right=5 imm=1
jump imm=4
if the following are true:
- instruction #0 is
addi dst=1 src=0 imm=0
- the PC at time 0 = 0
then value of cell 1 at time 1 = 0
- instruction #0 is
if the following are true:
- instruction #0 is
addi dst=1 src=0 imm=0
- the PC at time 0 = 0
then the PC at time 1 = 1
- instruction #0 is
if the following are true:
- instruction #1 is
addi dst=2 src=0 imm=1
- the PC at time 1 = 1
then value of cell 2 at time 2 = 1
- instruction #1 is
if the following are true:
- instruction #1 is
addi dst=2 src=0 imm=1
- the PC at time 1 = 1
then the PC at time 2 = 2
- instruction #1 is
if the following are true:
- instruction #1 is
addi dst=2 src=0 imm=1
- the PC at time 1 = 1
- value of cell 1 at time 1 = 0
then value of cell 1 at time 2 = 0
- instruction #1 is
if the following are true:
- instruction #2 is
addi dst=4 src=0 imm=0
- the PC at time 2 = 2
then value of cell 4 at time 3 = 0
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=4 src=0 imm=0
- the PC at time 2 = 2
then the PC at time 3 = 3
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=4 src=0 imm=0
- the PC at time 2 = 2
- value of cell 1 at time 2 = 0
then value of cell 1 at time 3 = 0
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=4 src=0 imm=0
- the PC at time 2 = 2
- value of cell 2 at time 2 = 1
then value of cell 2 at time 3 = 1
- instruction #2 is
if the following are true:
- instruction #3 is
addi dst=5 src=0 imm=4
- the PC at time 3 = 3
then value of cell 5 at time 4 = 4
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=5 src=0 imm=4
- the PC at time 3 = 3
then the PC at time 4 = 4
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=5 src=0 imm=4
- the PC at time 3 = 3
- value of cell 1 at time 3 = 0
then value of cell 1 at time 4 = 0
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=5 src=0 imm=4
- the PC at time 3 = 3
- value of cell 2 at time 3 = 1
then value of cell 2 at time 4 = 1
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=5 src=0 imm=4
- the PC at time 3 = 3
- value of cell 4 at time 3 = 0
then value of cell 4 at time 4 = 0
- instruction #3 is
if the following are true:
- the PC at time 4 = 4
- instruction #4 is
add dst=3 src1=1 src2=2
then value of cell 3 at time 5 = (value of cell 1 at time 4) + (value of cell 2 at time 4)
if the following are true:
- value of cell 3 at time 5 = (value of cell 1 at time 4) + (value of cell 2 at time 4)
- value of cell 1 at time 4 = 0
- value of cell 2 at time 4 = 1
then value of cell 3 at time 5 = 1
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 4 = 4
then the PC at time 5 = 5
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 4 = 4
- value of cell 1 at time 4 = 0
then value of cell 1 at time 5 = 0
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 4 = 4
- value of cell 2 at time 4 = 1
then value of cell 2 at time 5 = 1
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 4 = 4
- value of cell 4 at time 4 = 0
then value of cell 4 at time 5 = 0
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 4 = 4
- value of cell 5 at time 4 = 4
then value of cell 5 at time 5 = 4
- instruction #4 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 5 = 5
- value of cell 2 at time 5 = 1
then value of cell 1 at time 6 = 1
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 5 = 5
then the PC at time 6 = 6
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 5 = 5
- value of cell 2 at time 5 = 1
then value of cell 2 at time 6 = 1
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 5 = 5
- value of cell 4 at time 5 = 0
then value of cell 4 at time 6 = 0
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 5 = 5
- value of cell 5 at time 5 = 4
then value of cell 5 at time 6 = 4
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 5 = 5
- value of cell 3 at time 5 = 1
then value of cell 3 at time 6 = 1
- instruction #5 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 6 = 6
- value of cell 3 at time 6 = 1
then value of cell 2 at time 7 = 1
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 6 = 6
then the PC at time 7 = 7
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 6 = 6
- value of cell 1 at time 6 = 1
then value of cell 1 at time 7 = 1
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 6 = 6
- value of cell 4 at time 6 = 0
then value of cell 4 at time 7 = 0
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 6 = 6
- value of cell 5 at time 6 = 4
then value of cell 5 at time 7 = 4
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 6 = 6
- value of cell 3 at time 6 = 1
then value of cell 3 at time 7 = 1
- instruction #6 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 7 = 7
- value of cell 4 at time 7 = 0
then value of cell 4 at time 8 = 1
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 7 = 7
then the PC at time 8 = 8
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 7 = 7
- value of cell 1 at time 7 = 1
then value of cell 1 at time 8 = 1
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 7 = 7
- value of cell 2 at time 7 = 1
then value of cell 2 at time 8 = 1
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 7 = 7
- value of cell 5 at time 7 = 4
then value of cell 5 at time 8 = 4
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 7 = 7
- value of cell 3 at time 7 = 1
then value of cell 3 at time 8 = 1
- instruction #7 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 8 = 8
- value of cell 4 at time 8 = 1
- value of cell 5 at time 8 = 4
then the PC at time 9 = 9
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 8 = 8
- value of cell 1 at time 8 = 1
then value of cell 1 at time 9 = 1
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 8 = 8
- value of cell 2 at time 8 = 1
then value of cell 2 at time 9 = 1
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 8 = 8
- value of cell 4 at time 8 = 1
then value of cell 4 at time 9 = 1
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 8 = 8
- value of cell 5 at time 8 = 4
then value of cell 5 at time 9 = 4
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 8 = 8
- value of cell 3 at time 8 = 1
then value of cell 3 at time 9 = 1
- instruction #8 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 9 = 9
then the PC at time 10 = 4
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 9 = 9
- value of cell 1 at time 9 = 1
then value of cell 1 at time 10 = 1
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 9 = 9
- value of cell 2 at time 9 = 1
then value of cell 2 at time 10 = 1
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 9 = 9
- value of cell 4 at time 9 = 1
then value of cell 4 at time 10 = 1
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 9 = 9
- value of cell 5 at time 9 = 4
then value of cell 5 at time 10 = 4
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 9 = 9
- value of cell 3 at time 9 = 1
then value of cell 3 at time 10 = 1
- instruction #9 is
if the following are true:
- the PC at time 10 = 4
- instruction #4 is
add dst=3 src1=1 src2=2
then value of cell 3 at time 11 = (value of cell 1 at time 10) + (value of cell 2 at time 10)
if the following are true:
- value of cell 3 at time 11 = (value of cell 1 at time 10) + (value of cell 2 at time 10)
- value of cell 1 at time 10 = 1
- value of cell 2 at time 10 = 1
then value of cell 3 at time 11 = 2
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
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 10 = 4
- value of cell 1 at time 10 = 1
then value of cell 1 at time 11 = 1
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 10 = 4
- value of cell 2 at time 10 = 1
then value of cell 2 at time 11 = 1
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 10 = 4
- value of cell 4 at time 10 = 1
then value of cell 4 at time 11 = 1
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 10 = 4
- value of cell 5 at time 10 = 4
then value of cell 5 at time 11 = 4
- instruction #4 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 11 = 5
- value of cell 2 at time 11 = 1
then value of cell 1 at time 12 = 1
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 11 = 5
then the PC at time 12 = 6
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 11 = 5
- value of cell 2 at time 11 = 1
then value of cell 2 at time 12 = 1
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 11 = 5
- value of cell 4 at time 11 = 1
then value of cell 4 at time 12 = 1
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 11 = 5
- value of cell 5 at time 11 = 4
then value of cell 5 at time 12 = 4
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 11 = 5
- value of cell 3 at time 11 = 2
then value of cell 3 at time 12 = 2
- instruction #5 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 12 = 6
- value of cell 3 at time 12 = 2
then value of cell 2 at time 13 = 2
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 12 = 6
then the PC at time 13 = 7
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 12 = 6
- value of cell 1 at time 12 = 1
then value of cell 1 at time 13 = 1
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 12 = 6
- value of cell 4 at time 12 = 1
then value of cell 4 at time 13 = 1
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 12 = 6
- value of cell 5 at time 12 = 4
then value of cell 5 at time 13 = 4
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 12 = 6
- value of cell 3 at time 12 = 2
then value of cell 3 at time 13 = 2
- instruction #6 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 13 = 7
- value of cell 4 at time 13 = 1
then value of cell 4 at time 14 = 2
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 13 = 7
then the PC at time 14 = 8
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 13 = 7
- value of cell 1 at time 13 = 1
then value of cell 1 at time 14 = 1
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 13 = 7
- value of cell 2 at time 13 = 2
then value of cell 2 at time 14 = 2
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 13 = 7
- value of cell 5 at time 13 = 4
then value of cell 5 at time 14 = 4
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 13 = 7
- value of cell 3 at time 13 = 2
then value of cell 3 at time 14 = 2
- instruction #7 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 14 = 8
- value of cell 4 at time 14 = 2
- value of cell 5 at time 14 = 4
then the PC at time 15 = 9
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 14 = 8
- value of cell 1 at time 14 = 1
then value of cell 1 at time 15 = 1
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 14 = 8
- value of cell 2 at time 14 = 2
then value of cell 2 at time 15 = 2
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 14 = 8
- value of cell 4 at time 14 = 2
then value of cell 4 at time 15 = 2
- instruction #8 is
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
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 14 = 8
- value of cell 3 at time 14 = 2
then value of cell 3 at time 15 = 2
- instruction #8 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 15 = 9
then the PC at time 16 = 4
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 15 = 9
- value of cell 1 at time 15 = 1
then value of cell 1 at time 16 = 1
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 15 = 9
- value of cell 2 at time 15 = 2
then value of cell 2 at time 16 = 2
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 15 = 9
- value of cell 4 at time 15 = 2
then value of cell 4 at time 16 = 2
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 15 = 9
- value of cell 5 at time 15 = 4
then value of cell 5 at time 16 = 4
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 15 = 9
- value of cell 3 at time 15 = 2
then value of cell 3 at time 16 = 2
- instruction #9 is
if the following are true:
- the PC at time 16 = 4
- instruction #4 is
add dst=3 src1=1 src2=2
then value of cell 3 at time 17 = (value of cell 1 at time 16) + (value of cell 2 at time 16)
if the following are true:
- value of cell 3 at time 17 = (value of cell 1 at time 16) + (value of cell 2 at time 16)
- value of cell 1 at time 16 = 1
- value of cell 2 at time 16 = 2
then value of cell 3 at time 17 = 3
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 16 = 4
then the PC at time 17 = 5
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 16 = 4
- value of cell 1 at time 16 = 1
then value of cell 1 at time 17 = 1
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 16 = 4
- value of cell 2 at time 16 = 2
then value of cell 2 at time 17 = 2
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 16 = 4
- value of cell 4 at time 16 = 2
then value of cell 4 at time 17 = 2
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 16 = 4
- value of cell 5 at time 16 = 4
then value of cell 5 at time 17 = 4
- instruction #4 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 17 = 5
- value of cell 2 at time 17 = 2
then value of cell 1 at time 18 = 2
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 17 = 5
then the PC at time 18 = 6
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 17 = 5
- value of cell 2 at time 17 = 2
then value of cell 2 at time 18 = 2
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 17 = 5
- value of cell 4 at time 17 = 2
then value of cell 4 at time 18 = 2
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 17 = 5
- value of cell 5 at time 17 = 4
then value of cell 5 at time 18 = 4
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 17 = 5
- value of cell 3 at time 17 = 3
then value of cell 3 at time 18 = 3
- instruction #5 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 18 = 6
- value of cell 3 at time 18 = 3
then value of cell 2 at time 19 = 3
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 18 = 6
then the PC at time 19 = 7
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 18 = 6
- value of cell 1 at time 18 = 2
then value of cell 1 at time 19 = 2
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 18 = 6
- value of cell 4 at time 18 = 2
then value of cell 4 at time 19 = 2
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 18 = 6
- value of cell 5 at time 18 = 4
then value of cell 5 at time 19 = 4
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 18 = 6
- value of cell 3 at time 18 = 3
then value of cell 3 at time 19 = 3
- instruction #6 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 19 = 7
- value of cell 4 at time 19 = 2
then value of cell 4 at time 20 = 3
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 19 = 7
then the PC at time 20 = 8
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 19 = 7
- value of cell 1 at time 19 = 2
then value of cell 1 at time 20 = 2
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 19 = 7
- value of cell 2 at time 19 = 3
then value of cell 2 at time 20 = 3
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 19 = 7
- value of cell 5 at time 19 = 4
then value of cell 5 at time 20 = 4
- instruction #7 is
if the following are true:
- instruction #7 is
addi dst=4 src=4 imm=1
- the PC at time 19 = 7
- value of cell 3 at time 19 = 3
then value of cell 3 at time 20 = 3
- instruction #7 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 20 = 8
- value of cell 4 at time 20 = 3
- value of cell 5 at time 20 = 4
then the PC at time 21 = 9
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 20 = 8
- value of cell 1 at time 20 = 2
then value of cell 1 at time 21 = 2
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 20 = 8
- value of cell 2 at time 20 = 3
then value of cell 2 at time 21 = 3
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 20 = 8
- value of cell 4 at time 20 = 3
then value of cell 4 at time 21 = 3
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 20 = 8
- value of cell 5 at time 20 = 4
then value of cell 5 at time 21 = 4
- instruction #8 is
if the following are true:
- instruction #8 is
beq left=4 right=5 imm=1
- the PC at time 20 = 8
- value of cell 3 at time 20 = 3
then value of cell 3 at time 21 = 3
- instruction #8 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 21 = 9
then the PC at time 22 = 4
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 21 = 9
- value of cell 1 at time 21 = 2
then value of cell 1 at time 22 = 2
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 21 = 9
- value of cell 2 at time 21 = 3
then value of cell 2 at time 22 = 3
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 21 = 9
- value of cell 4 at time 21 = 3
then value of cell 4 at time 22 = 3
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 21 = 9
- value of cell 5 at time 21 = 4
then value of cell 5 at time 22 = 4
- instruction #9 is
if the following are true:
- instruction #9 is
jump imm=4
- the PC at time 21 = 9
- value of cell 3 at time 21 = 3
then value of cell 3 at time 22 = 3
- instruction #9 is
if the following are true:
- the PC at time 22 = 4
- instruction #4 is
add dst=3 src1=1 src2=2
then value of cell 3 at time 23 = (value of cell 1 at time 22) + (value of cell 2 at time 22)
if the following are true:
- value of cell 3 at time 23 = (value of cell 1 at time 22) + (value of cell 2 at time 22)
- value of cell 1 at time 22 = 2
- value of cell 2 at time 22 = 3
then value of cell 3 at time 23 = 5
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 22 = 4
then the PC at time 23 = 5
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 22 = 4
- value of cell 1 at time 22 = 2
then value of cell 1 at time 23 = 2
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 22 = 4
- value of cell 2 at time 22 = 3
then value of cell 2 at time 23 = 3
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 22 = 4
- value of cell 4 at time 22 = 3
then value of cell 4 at time 23 = 3
- instruction #4 is
if the following are true:
- instruction #4 is
add dst=3 src1=1 src2=2
- the PC at time 22 = 4
- value of cell 5 at time 22 = 4
then value of cell 5 at time 23 = 4
- instruction #4 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 23 = 5
- value of cell 2 at time 23 = 3
then value of cell 1 at time 24 = 3
- instruction #5 is
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
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 23 = 5
- value of cell 2 at time 23 = 3
then value of cell 2 at time 24 = 3
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 23 = 5
- value of cell 4 at time 23 = 3
then value of cell 4 at time 24 = 3
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 23 = 5
- value of cell 5 at time 23 = 4
then value of cell 5 at time 24 = 4
- instruction #5 is
if the following are true:
- instruction #5 is
addi dst=1 src=2 imm=0
- the PC at time 23 = 5
- value of cell 3 at time 23 = 5
then value of cell 3 at time 24 = 5
- instruction #5 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 24 = 6
- value of cell 3 at time 24 = 5
then value of cell 2 at time 25 = 5
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 24 = 6
then the PC at time 25 = 7
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 24 = 6
- value of cell 1 at time 24 = 3
then value of cell 1 at time 25 = 3
- instruction #6 is
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
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 24 = 6
- value of cell 5 at time 24 = 4
then value of cell 5 at time 25 = 4
- instruction #6 is
if the following are true:
- instruction #6 is
addi dst=2 src=3 imm=0
- the PC at time 24 = 6
- value of cell 3 at time 24 = 5
then value of cell 3 at time 25 = 5
- instruction #6 is
Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.