Function Add Instruction

The add instruction adds values in src1 and src2 and stores the result in dst

Format:

instruction #i is add dst=dst src1=src1 src2=src2

Input:

number i -
number dst -
number src1 -
number src2 -

Output:

boolean - None

Details:

Instructions
Memory Cells
Program Counter Time
0 0
LW Computer Simulator

Conditional properties that reference this function:

  • if the following are true:
    • instruction #i is add dst=d src1=s1 src2=s2
    • the PC at time t = i

    then value of cell d at time (t + 1) = (value of cell s1 at time t) + (value of cell s2 at time t)

    (link)
  • if the following are true:
    • instruction #i is add dst=d src1=s1 src2=s2
    • the PC at time t = i
    • not (other = d)

    then value of cell other at time (t + 1) = value of cell other at time t

    (link)
  • if the following are true:
    • instruction #x is add dst=s src1=d src2=imm
    • the PC at time t = x

    then the PC at time (t + 1) = x + 1

    (link)


Comments

Please log in to add comments