Sign and Magnitude
One way to represent negative numbers is to make the left most bit the sign bit. The sign bit sets if the number is negative or not.
Example
00000011 = 3
10000011 = -3
Two's Complement
Two’s Complement
Two’s compliment allows us to convert numbers from positive to negative and vice versa.
Steps
- Flip all the bits.
- Add 1.
Example
Link to original00000011 = 3 FLIP 11111100 ADD 00000001 ------------ 11111101 = -3