Cell #3 specifies the number of values to copy. Cell #5 indicates where the source array begins. Cell #6 indicates where the destination array begins.
Together, these cells indicate that we want to copy cells 8, 9, and 10 to cells 12, 13, 14.
By specifying these parameters in memory, we don't have to change the instructions when we have a longer or shorter array or the array is in a different location. We can just update memory cells 3, 5, and 6.
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
Instruction #0 copies cell #8 to cell #7. The source is the value stored in cell #5 (8) plus the imm (0).
Instruction #1 copies cell #7 to cell #12. The destination is the value stored in cell #6 (12) plus the imm (0).
Notice how the computer first copied cell #8 to #7, then again from #7 to #12. Cell #7 is a "work area" cell where the program temporarily stores the value before it is copied to the actual destination.
Why don't we just copy cell #8 directly to cell #12? We could do that with addi dst=12 src=8 imm=0
, for example. But let's suppose that some time later, we want to copy values again, but the source the source starts somewhere else, say, cell #18. Then we need to change the ADDI instruction src to 18. But we prefer to keep the instructions the same, if possible, so that we can easily reuse them. For instance, the copy instrcutions might be part of a larger program that jumps to the copy instructions many times with different source arrays and/or destinations.
Then how about using a single LOAD instruction with dst=12? Then the source can change in memory, but the destination is still specified in the instruction, so the destination cannot change without changing the instruction. This is more flexible than ADDI, but not flexible enough.
Similarly, using a single STORE instruction means that the destination is flexible, but not the source.
Thus we use both LOAD and STORE instructions. Using LOAD allows the source to be specified in memory. The destination, cell #7, is in the instruction. Then, the STORE instruction uses cell #7 as the source. Using the STORE instruction allows the destination to be spcified in memory.
After a value is copied to the destination, we increment the source (cell #5) and destination (cell #6) by one, so that the next time the LOAD and STORE instructions run, the next value in the array (31) will be copied. We also increment the counter (#4) to remember how many values have been copied.
The BEQ instruction checks whether we've copied values enough times. If so, the program jumps to the end. If not, instruction #6 runs, and the computer jumps back to instruction #0. The result is a loop that copies 1 value at each iteration.
Quiz (1 point)
load dst=7 addr=5 imm=0
store src=7 addr=6 imm=0
addi dst=5 src=5 imm=1
addi dst=6 src=6 imm=1
addi dst=4 src=4 imm=1
beq left=3 right=4 imm=1
jump imm=0
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 5 at time 0 = 8
- value of cell 8 at time 0 = 24
then value of cell 7 at time 1 = 24
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
then the PC at time 1 = 1
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 3 at time 0 = 3
then value of cell 3 at time 1 = 3
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 4 at time 0 = 0
then value of cell 4 at time 1 = 0
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 5 at time 0 = 8
then value of cell 5 at time 1 = 8
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 6 at time 0 = 12
then value of cell 6 at time 1 = 12
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 8 at time 0 = 24
then value of cell 8 at time 1 = 24
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 9 at time 0 = 31
then value of cell 9 at time 1 = 31
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 0 = 0
- value of cell 10 at time 0 = 45
then value of cell 10 at time 1 = 45
- instruction #0 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 6 at time 1 = 12
- value of cell 7 at time 1 = 24
then value of cell 12 at time 2 = 24
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
then the PC at time 2 = 2
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 3 at time 1 = 3
- value of cell 6 at time 1 = 12
then value of cell 3 at time 2 = 3
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 4 at time 1 = 0
- value of cell 6 at time 1 = 12
then value of cell 4 at time 2 = 0
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 5 at time 1 = 8
- value of cell 6 at time 1 = 12
then value of cell 5 at time 2 = 8
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 6 at time 1 = 12
- value of cell 6 at time 1 = 12
then value of cell 6 at time 2 = 12
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 8 at time 1 = 24
- value of cell 6 at time 1 = 12
then value of cell 8 at time 2 = 24
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 9 at time 1 = 31
- value of cell 6 at time 1 = 12
then value of cell 9 at time 2 = 31
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 10 at time 1 = 45
- value of cell 6 at time 1 = 12
then value of cell 10 at time 2 = 45
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 1 = 1
- value of cell 7 at time 1 = 24
- value of cell 6 at time 1 = 12
then value of cell 7 at time 2 = 24
- instruction #1 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 5 at time 2 = 8
then value of cell 5 at time 3 = 9
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- 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=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 3 at time 2 = 3
then value of cell 3 at time 3 = 3
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 4 at time 2 = 0
then value of cell 4 at time 3 = 0
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 6 at time 2 = 12
then value of cell 6 at time 3 = 12
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 8 at time 2 = 24
then value of cell 8 at time 3 = 24
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 9 at time 2 = 31
then value of cell 9 at time 3 = 31
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 10 at time 2 = 45
then value of cell 10 at time 3 = 45
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 7 at time 2 = 24
then value of cell 7 at time 3 = 24
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 2 = 2
- value of cell 12 at time 2 = 24
then value of cell 12 at time 3 = 24
- instruction #2 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 6 at time 3 = 12
then value of cell 6 at time 4 = 13
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- 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=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 3 at time 3 = 3
then value of cell 3 at time 4 = 3
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- 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:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 5 at time 3 = 9
then value of cell 5 at time 4 = 9
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 8 at time 3 = 24
then value of cell 8 at time 4 = 24
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 9 at time 3 = 31
then value of cell 9 at time 4 = 31
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 10 at time 3 = 45
then value of cell 10 at time 4 = 45
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 7 at time 3 = 24
then value of cell 7 at time 4 = 24
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 3 = 3
- value of cell 12 at time 3 = 24
then value of cell 12 at time 4 = 24
- instruction #3 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 4 at time 4 = 0
then value of cell 4 at time 5 = 1
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
then the PC at time 5 = 5
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 3 at time 4 = 3
then value of cell 3 at time 5 = 3
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 5 at time 4 = 9
then value of cell 5 at time 5 = 9
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 6 at time 4 = 13
then value of cell 6 at time 5 = 13
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 8 at time 4 = 24
then value of cell 8 at time 5 = 24
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 9 at time 4 = 31
then value of cell 9 at time 5 = 31
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 10 at time 4 = 45
then value of cell 10 at time 5 = 45
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 7 at time 4 = 24
then value of cell 7 at time 5 = 24
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 4 = 4
- value of cell 12 at time 4 = 24
then value of cell 12 at time 5 = 24
- instruction #4 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 3 at time 5 = 3
- value of cell 4 at time 5 = 1
then the PC at time 6 = 6
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 3 at time 5 = 3
then value of cell 3 at time 6 = 3
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 4 at time 5 = 1
then value of cell 4 at time 6 = 1
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 5 at time 5 = 9
then value of cell 5 at time 6 = 9
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 6 at time 5 = 13
then value of cell 6 at time 6 = 13
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 8 at time 5 = 24
then value of cell 8 at time 6 = 24
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 9 at time 5 = 31
then value of cell 9 at time 6 = 31
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 10 at time 5 = 45
then value of cell 10 at time 6 = 45
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 7 at time 5 = 24
then value of cell 7 at time 6 = 24
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 5 = 5
- value of cell 12 at time 5 = 24
then value of cell 12 at time 6 = 24
- instruction #5 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
then the PC at time 7 = 0
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 3 at time 6 = 3
then value of cell 3 at time 7 = 3
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 4 at time 6 = 1
then value of cell 4 at time 7 = 1
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 5 at time 6 = 9
then value of cell 5 at time 7 = 9
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 6 at time 6 = 13
then value of cell 6 at time 7 = 13
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 8 at time 6 = 24
then value of cell 8 at time 7 = 24
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 9 at time 6 = 31
then value of cell 9 at time 7 = 31
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 10 at time 6 = 45
then value of cell 10 at time 7 = 45
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 7 at time 6 = 24
then value of cell 7 at time 7 = 24
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 6 = 6
- value of cell 12 at time 6 = 24
then value of cell 12 at time 7 = 24
- instruction #6 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 5 at time 7 = 9
- value of cell 9 at time 7 = 31
then value of cell 7 at time 8 = 31
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
then the PC at time 8 = 1
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 3 at time 7 = 3
then value of cell 3 at time 8 = 3
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 4 at time 7 = 1
then value of cell 4 at time 8 = 1
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 5 at time 7 = 9
then value of cell 5 at time 8 = 9
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 6 at time 7 = 13
then value of cell 6 at time 8 = 13
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 8 at time 7 = 24
then value of cell 8 at time 8 = 24
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 9 at time 7 = 31
then value of cell 9 at time 8 = 31
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 10 at time 7 = 45
then value of cell 10 at time 8 = 45
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 7 = 0
- value of cell 12 at time 7 = 24
then value of cell 12 at time 8 = 24
- instruction #0 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 6 at time 8 = 13
- value of cell 7 at time 8 = 31
then value of cell 13 at time 9 = 31
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
then the PC at time 9 = 2
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 3 at time 8 = 3
- value of cell 6 at time 8 = 13
then value of cell 3 at time 9 = 3
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 4 at time 8 = 1
- value of cell 6 at time 8 = 13
then value of cell 4 at time 9 = 1
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 5 at time 8 = 9
- value of cell 6 at time 8 = 13
then value of cell 5 at time 9 = 9
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 6 at time 8 = 13
- value of cell 6 at time 8 = 13
then value of cell 6 at time 9 = 13
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 8 at time 8 = 24
- value of cell 6 at time 8 = 13
then value of cell 8 at time 9 = 24
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 9 at time 8 = 31
- value of cell 6 at time 8 = 13
then value of cell 9 at time 9 = 31
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 10 at time 8 = 45
- value of cell 6 at time 8 = 13
then value of cell 10 at time 9 = 45
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 7 at time 8 = 31
- value of cell 6 at time 8 = 13
then value of cell 7 at time 9 = 31
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 8 = 1
- value of cell 12 at time 8 = 24
- value of cell 6 at time 8 = 13
then value of cell 12 at time 9 = 24
- instruction #1 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 5 at time 9 = 9
then value of cell 5 at time 10 = 10
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
then the PC at time 10 = 3
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 3 at time 9 = 3
then value of cell 3 at time 10 = 3
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 4 at time 9 = 1
then value of cell 4 at time 10 = 1
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 6 at time 9 = 13
then value of cell 6 at time 10 = 13
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 8 at time 9 = 24
then value of cell 8 at time 10 = 24
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 9 at time 9 = 31
then value of cell 9 at time 10 = 31
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 10 at time 9 = 45
then value of cell 10 at time 10 = 45
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 7 at time 9 = 31
then value of cell 7 at time 10 = 31
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 12 at time 9 = 24
then value of cell 12 at time 10 = 24
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 9 = 2
- value of cell 13 at time 9 = 31
then value of cell 13 at time 10 = 31
- instruction #2 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 6 at time 10 = 13
then value of cell 6 at time 11 = 14
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
then the PC at time 11 = 4
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 3 at time 10 = 3
then value of cell 3 at time 11 = 3
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 4 at time 10 = 1
then value of cell 4 at time 11 = 1
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 5 at time 10 = 10
then value of cell 5 at time 11 = 10
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 8 at time 10 = 24
then value of cell 8 at time 11 = 24
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 9 at time 10 = 31
then value of cell 9 at time 11 = 31
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 10 at time 10 = 45
then value of cell 10 at time 11 = 45
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 7 at time 10 = 31
then value of cell 7 at time 11 = 31
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 12 at time 10 = 24
then value of cell 12 at time 11 = 24
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 10 = 3
- value of cell 13 at time 10 = 31
then value of cell 13 at time 11 = 31
- instruction #3 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 4 at time 11 = 1
then value of cell 4 at time 12 = 2
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
then the PC at time 12 = 5
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 3 at time 11 = 3
then value of cell 3 at time 12 = 3
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 5 at time 11 = 10
then value of cell 5 at time 12 = 10
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 6 at time 11 = 14
then value of cell 6 at time 12 = 14
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 8 at time 11 = 24
then value of cell 8 at time 12 = 24
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 9 at time 11 = 31
then value of cell 9 at time 12 = 31
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 10 at time 11 = 45
then value of cell 10 at time 12 = 45
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 7 at time 11 = 31
then value of cell 7 at time 12 = 31
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 12 at time 11 = 24
then value of cell 12 at time 12 = 24
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 11 = 4
- value of cell 13 at time 11 = 31
then value of cell 13 at time 12 = 31
- instruction #4 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 3 at time 12 = 3
- value of cell 4 at time 12 = 2
then the PC at time 13 = 6
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 3 at time 12 = 3
then value of cell 3 at time 13 = 3
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 4 at time 12 = 2
then value of cell 4 at time 13 = 2
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 5 at time 12 = 10
then value of cell 5 at time 13 = 10
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 6 at time 12 = 14
then value of cell 6 at time 13 = 14
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 8 at time 12 = 24
then value of cell 8 at time 13 = 24
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 9 at time 12 = 31
then value of cell 9 at time 13 = 31
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 10 at time 12 = 45
then value of cell 10 at time 13 = 45
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 7 at time 12 = 31
then value of cell 7 at time 13 = 31
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 12 at time 12 = 24
then value of cell 12 at time 13 = 24
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 12 = 5
- value of cell 13 at time 12 = 31
then value of cell 13 at time 13 = 31
- instruction #5 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
then the PC at time 14 = 0
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 3 at time 13 = 3
then value of cell 3 at time 14 = 3
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 4 at time 13 = 2
then value of cell 4 at time 14 = 2
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 5 at time 13 = 10
then value of cell 5 at time 14 = 10
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 6 at time 13 = 14
then value of cell 6 at time 14 = 14
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 8 at time 13 = 24
then value of cell 8 at time 14 = 24
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 9 at time 13 = 31
then value of cell 9 at time 14 = 31
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 10 at time 13 = 45
then value of cell 10 at time 14 = 45
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 7 at time 13 = 31
then value of cell 7 at time 14 = 31
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 12 at time 13 = 24
then value of cell 12 at time 14 = 24
- instruction #6 is
if the following are true:
- instruction #6 is
jump imm=0
- the PC at time 13 = 6
- value of cell 13 at time 13 = 31
then value of cell 13 at time 14 = 31
- instruction #6 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 5 at time 14 = 10
- value of cell 10 at time 14 = 45
then value of cell 7 at time 15 = 45
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
then the PC at time 15 = 1
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 3 at time 14 = 3
then value of cell 3 at time 15 = 3
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 4 at time 14 = 2
then value of cell 4 at time 15 = 2
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 5 at time 14 = 10
then value of cell 5 at time 15 = 10
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 6 at time 14 = 14
then value of cell 6 at time 15 = 14
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 8 at time 14 = 24
then value of cell 8 at time 15 = 24
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 9 at time 14 = 31
then value of cell 9 at time 15 = 31
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 10 at time 14 = 45
then value of cell 10 at time 15 = 45
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 12 at time 14 = 24
then value of cell 12 at time 15 = 24
- instruction #0 is
if the following are true:
- instruction #0 is
load dst=7 addr=5 imm=0
- the PC at time 14 = 0
- value of cell 13 at time 14 = 31
then value of cell 13 at time 15 = 31
- instruction #0 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 6 at time 15 = 14
- value of cell 7 at time 15 = 45
then value of cell 14 at time 16 = 45
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
then the PC at time 16 = 2
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 3 at time 15 = 3
- value of cell 6 at time 15 = 14
then value of cell 3 at time 16 = 3
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 4 at time 15 = 2
- value of cell 6 at time 15 = 14
then value of cell 4 at time 16 = 2
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 5 at time 15 = 10
- value of cell 6 at time 15 = 14
then value of cell 5 at time 16 = 10
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 6 at time 15 = 14
- value of cell 6 at time 15 = 14
then value of cell 6 at time 16 = 14
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 8 at time 15 = 24
- value of cell 6 at time 15 = 14
then value of cell 8 at time 16 = 24
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 9 at time 15 = 31
- value of cell 6 at time 15 = 14
then value of cell 9 at time 16 = 31
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 10 at time 15 = 45
- value of cell 6 at time 15 = 14
then value of cell 10 at time 16 = 45
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 7 at time 15 = 45
- value of cell 6 at time 15 = 14
then value of cell 7 at time 16 = 45
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 12 at time 15 = 24
- value of cell 6 at time 15 = 14
then value of cell 12 at time 16 = 24
- instruction #1 is
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 13 at time 15 = 31
- value of cell 6 at time 15 = 14
then value of cell 13 at time 16 = 31
- instruction #1 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 5 at time 16 = 10
then value of cell 5 at time 17 = 11
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
then the PC at time 17 = 3
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 3 at time 16 = 3
then value of cell 3 at time 17 = 3
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 4 at time 16 = 2
then value of cell 4 at time 17 = 2
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 6 at time 16 = 14
then value of cell 6 at time 17 = 14
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 8 at time 16 = 24
then value of cell 8 at time 17 = 24
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 9 at time 16 = 31
then value of cell 9 at time 17 = 31
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 10 at time 16 = 45
then value of cell 10 at time 17 = 45
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 7 at time 16 = 45
then value of cell 7 at time 17 = 45
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 12 at time 16 = 24
then value of cell 12 at time 17 = 24
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 13 at time 16 = 31
then value of cell 13 at time 17 = 31
- instruction #2 is
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1
- the PC at time 16 = 2
- value of cell 14 at time 16 = 45
then value of cell 14 at time 17 = 45
- instruction #2 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 6 at time 17 = 14
then value of cell 6 at time 18 = 15
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
then the PC at time 18 = 4
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 3 at time 17 = 3
then value of cell 3 at time 18 = 3
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 4 at time 17 = 2
then value of cell 4 at time 18 = 2
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 5 at time 17 = 11
then value of cell 5 at time 18 = 11
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 8 at time 17 = 24
then value of cell 8 at time 18 = 24
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 9 at time 17 = 31
then value of cell 9 at time 18 = 31
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 10 at time 17 = 45
then value of cell 10 at time 18 = 45
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 7 at time 17 = 45
then value of cell 7 at time 18 = 45
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 12 at time 17 = 24
then value of cell 12 at time 18 = 24
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 13 at time 17 = 31
then value of cell 13 at time 18 = 31
- instruction #3 is
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1
- the PC at time 17 = 3
- value of cell 14 at time 17 = 45
then value of cell 14 at time 18 = 45
- instruction #3 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 4 at time 18 = 2
then value of cell 4 at time 19 = 3
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
then the PC at time 19 = 5
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 3 at time 18 = 3
then value of cell 3 at time 19 = 3
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 5 at time 18 = 11
then value of cell 5 at time 19 = 11
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 6 at time 18 = 15
then value of cell 6 at time 19 = 15
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 8 at time 18 = 24
then value of cell 8 at time 19 = 24
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 9 at time 18 = 31
then value of cell 9 at time 19 = 31
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 10 at time 18 = 45
then value of cell 10 at time 19 = 45
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 7 at time 18 = 45
then value of cell 7 at time 19 = 45
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 12 at time 18 = 24
then value of cell 12 at time 19 = 24
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 13 at time 18 = 31
then value of cell 13 at time 19 = 31
- instruction #4 is
if the following are true:
- instruction #4 is
addi dst=4 src=4 imm=1
- the PC at time 18 = 4
- value of cell 14 at time 18 = 45
then value of cell 14 at time 19 = 45
- instruction #4 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 3 at time 19 = 3
- value of cell 4 at time 19 = 3
then the PC at time 20 = 7
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 3 at time 19 = 3
then value of cell 3 at time 20 = 3
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 4 at time 19 = 3
then value of cell 4 at time 20 = 3
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 5 at time 19 = 11
then value of cell 5 at time 20 = 11
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 6 at time 19 = 15
then value of cell 6 at time 20 = 15
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 8 at time 19 = 24
then value of cell 8 at time 20 = 24
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 9 at time 19 = 31
then value of cell 9 at time 20 = 31
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 10 at time 19 = 45
then value of cell 10 at time 20 = 45
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 7 at time 19 = 45
then value of cell 7 at time 20 = 45
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 12 at time 19 = 24
then value of cell 12 at time 20 = 24
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 13 at time 19 = 31
then value of cell 13 at time 20 = 31
- instruction #5 is
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 14 at time 19 = 45
then value of cell 14 at time 20 = 45
- instruction #5 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.