|
|
|
|
|
|
|
What happens if we allow one of those digits (the leftmost one, for example) to represent an exponent? |
|
|
|
|
|
|
|
|
Then +82345 represents the number +2345 * 108. The range of numbers we now represent is much larger: |
|
|
|
|
|
|
|
|
-9999 * 109 through 9999 * 109 |
|
|
|
|
|
|
|
|
-9,999,000,000,000 through +9,999,000,000,000 |
|
|
|
|
|
|
|
|
However, our precision is now only four digits; that is, any four-digit number can be represented exactly in our system. But what happens to numbers with more digits? The four leftmost digits are represented correctly, and the rightmost digits, or least significant digits, are lost (assumed to be 0). Figure 10-2 shows what happens. Note that 1,000,000 can be represented exactly but -4,932,416 cannot, because this coding scheme limits us to four significant (nonzero) digits. |
|
|
|
|
|
|
|
|
To extend our coding scheme to represent floating point numbers, we must be able to represent negative exponents. As examples, |
|
|
|
|
|
|
|
|
Figure 10-2
Coding Using Positive Exponents |
|
|
|
|
|