Adding Precision (two’s complement)
What if we want to take a twos complement number and add more bits to it? Take whatever the SIGN BIT is, and extend it to the left. -128 = $80 = % 10000000 (8 bits) = $FF80 = % 1111111110000000 (16 bits) = $FFFFFF80 (32 bits) + 127 = $7F = % 01111111 (8 bits) = $007F = % 0000000001111111 ( 16 bits) = $0000007F (32 bits)This is called SIGN EXTENSION. Extending the MSB to the left works for two’s complement numbers and unsigned numbers.