Status: Tags: #aCards/cmpt295/binary Links: Binary
Negative Binary
To accomodate for negative numbers, the total storage is split and categorized based on the nth bus
-x = (2^n)-x
- 1st bit on implies negative of capacity, rest are positive and negate it
15-Bit Example
Binary | Number | 2’s Complement |
---|---|---|
0000 | 0 | 0 |
0001 | 1 | 1 |
0111 | 8 | 8 |
1000 | -8 | 9 |
- This natural composition makes subtraction possible using Binary Addition
Two’s Complement to Binary
?
Binary to Two’s Complement
?
References: