Negating a Number
There is a simple two-step process for negation (eg, turn 3 = 011 into -3 = 101):
- invert every bit (e.g. replace 011 by 100)
- add 1 (e.g. 100+1 = 101).
Example, 4-bit word 1101
- 1101 = -8 + 4 + 0 + 1 = -3
- 3 = 0011
- Invert bits: 1100
- add 1: 1101 = -3 as required.