Signed and Zero Extension
An integer register on the MIPS is 32 bits.
When a value is loaded from memory with fewer than 32 bits, the
remaining bits must be assigned.
Sign extension is used for signed loads of bytes (8 bits using the
lb instruction) and halfwords (16 bits using the
Sign extension replicates the most significant bit loaded into the
Zero extension is used for unsigned loads of bytes (
Zeroes are filled in the remaining bits.