Representations
A bit sequence is neither signed nor unsigned, integer or floating point, character or pixel ... its just a bit sequence -- the key is how the bits are interpreted
The interpretation nearly always matters, especially in comparisons:
- 10110 < 00110 is true since -10 < 6 as 2s complement
- 10110 > 00110 is true since 22 > 6 as unsigned
MIPS has additional comparison operators:
- sltu $8, $9, $10 #set less than unsigned
- sltiu $8, $9, 10 #set less than immed. unsign
Why are there no unsigned variants for beq, bne,
bgtz, blez, sh, sb, etc.?