For simplicity, we assume 4 bits of precision (or 3 bits of fraction).
- Step 1. Making Exponents Equal
-
Shift the significand of the lesser exponent right until its exponent matches the larger number:
1.0002×2-3 = 0.000012×22
- Step 2. Performing Subtraction
-
Use 2’s complement notation to find the difference as follows:
0.000012×22 – 1.00002×22
= –0.111112×22
|
|
↓ adding a sign bit
01.00000 (subtrahend)
10.11111 (reverse)
+ 00.00001 (add 1)
———————————
11.00000 (2’s compl.)
00.00001 (minuend)
+ 11.00000 (2’s compl.)
———————————
11.00001 (difference)
11.00001 (difference)
00.11110 (reverse)
+ 00.00001 (add 1)
———————————
–00.11111
|
|