ADDI Instruction Property 2
If an ADDI instruction is executed, then only memory cell #dst is affected, since that is where the result of the opration is stored. All other memory cell values remain unchanged. More formally:
if the following are true:
- instruction #i is
addi dst=dst src=src imm=imm
- the PC at time t = i
- not (other = dst)
then value of cell other at time (t + 1) = value of cell other at time t
Try running the following computer:
Instructions
Memory Cells |
---|
Program Counter | Time |
---|---|
0 | 0 |
LW Computer Simulator
Notice that only memory cell #2 is changed. Memory cells #0 and #1 remain the same. In other words:
if the following are true:
- instruction #0 is
addi dst=2 src=1 imm=5
- the PC at time 0 = 0
- not (1 = 2)
then value of cell 1 at time (0 + 1) = value of cell 1 at time 0
Comments
Please log in to add comments