Professional Documents
Culture Documents
Digital Design: Subtraction of Binary Numbers and Representation of Negative Values
Digital Design: Subtraction of Binary Numbers and Representation of Negative Values
Digital Design: Subtraction of Binary Numbers and Representation of Negative Values
1. Binary Subtraction
0–0=0
1–0 =1
1–1 =0
0 - 1 = 1 (Borrow 1, like 2 -1)
Binary Subtraction Example
123.75 – 85.5
1 [Borrow]
123.75 1111011.11
- 85.50 1010101.10
------------- -----------------------
38.25 0100110.01
2. Some Important Binary Number Properties
2(3) = 23= 8
3. One’s Complement
y = 15 – x = 15 – 10 =5 or 0101
127 1111111
- 123 1111011
------------- ------------------
4 0000100
*Note: Ones complement using decimal does not apply to
numbers with fractions.
4. Ones Complement Property of Binary Fractions:
123.7510 = 1111011.11
1’s Complement 0 0 0 0 1 0 0 . 0 0
+.0 1
----------------------
2’s Complement 0 0 0 0 1 0 0 . 0 1
a. If the MSB is 1
Compute the binary sum of all with the MSB
assigned a negative place value.
b. if the MSB is 0
Extend the MSB to the next higher bit, assign it a
value of 1 and a negative place value, and compute
the binary sum of all bits.