0350. How are negative numbers stored?

 

Negative numbers are stored as their compliments. A compliment may be thought of as the ‘mirror’ image of a number. In binary, that means that whenever we see a ‘1’, we change it to a ‘0’, and whenever we have a ‘0’, we change it to a ‘1’.

 

For example, the number 196 would be stored as 00000000110001002 (on 16-bits). The number -196 would be stored as:

 

0000000011000100

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

1111111100111011 (Ones Compliment)