What’s Your Sign?
- The standard add, sub, addi, etc. instructions use signed 2s complement values
- The immediate field is sign-extended to make a 32 bit value.
- A 2s complement value represented with x bits can be converted to the same value in a y bit representation y > x, by replicating the sign bit.
000000000001100100 li $s0,100
111111111110011100 li $s0,-100
Sign extend is also applied when loading bytes and halfwords,