Arithmetic: I-type | ||||||||||
001000 | 01000 | 01001 | 01010 | 00000 | 100001 | |||||
b31-26 | b25-21 | b20-16 | b15-0 | |||||||
opcode | $rs | $rt | immediate | |||||||
addi | ||||||||||
addi $rt, $rs, immed # R[t] <- R[s] + immed | ||||||||||
I-type | ||||||||||
add value given in the instruction to contents of a register | ||||||||||
how many bits in the value? | ||||||||||
sign bit extended | ||||||||||
note $rt is destination | ||||||||||
what about subi? | ||||||||||
opcode: 8 | ||||||||||
addiu | ||||||||||
unsigned add, without overflow | ||||||||||
opcode: 9 | ||||||||||
How would we increment the value of a register by a constant? | ||||||||||