Assembly language (MIPS) difference betweent addi and add

Assembly language (MIPS) difference betweent addi and add

add adds the value in two registers

addi adds an immediate value (constant) to the register

This gives you some example.

Adding to answer :

Add syntax looks like this :

Add rd , rs , rt // look difference rs , rt here

i.e rd <— rs + rt

bit(31)|operation code| rs | rt | rd |shift amount|function code| bit (0)

While addi :

Addi rt , rd , immediate // look difference of rt , rd compare to ADD

i.e rd <— rt + immediate

bit(31)|operation code|rs|rt|immediate(16 bits)| bit(0)

Assembly language (MIPS) difference betweent addi and add

Leave a Reply

Your email address will not be published.