Only a finite set of numbers can be represented in a floating-point system. This section answers three questions:
- How many numbers can be represented?
- What are the smallest and largest representable values?
- How are the numbers spaced on the number line?
Working Example Setup
We use Convention 1 (Standard Form) with:
β=2,m=3,emin=−1,emax=2
Step 1: List the Distinct Mantissas
In Convention 1, d1=1 is fixed; d2 and d3 each range over {0,1}.
This gives 22=4 distinct mantissas:
| Mantissa | Decimal value |
|---|
| 0.100 | 21=0.5 |
| 0.101 | 21+81=85=0.625 |
| 0.110 | 21+41=43=0.75 |
| 0.111 | 21+41+81=87=0.875 |
Step 2: List the Possible Exponents
e∈{−1,0,1,2} → 4 exponent values.
Counting Representable Numbers
Non-negative numbers=4 mantissas×4 exponents=16
Including the sign bit: 16×2=32 representable numbers (zero is a special case in Convention 1 — it cannot be stored exactly).
Smallest and Largest Values
Smallest positive number: smallest mantissa, smallest exponent:
Xmin=(0.100)2×2−1=21×21=41
Largest positive number: largest mantissa, largest exponent:
Xmax=(0.111)2×22=(21+41+81)×4=87×4=27=3.5
Considering the sign, the full representable range is [−27,27].
Spacing Between Adjacent Numbers
For a fixed exponent e, moving from one mantissa to the next changes only the last digit dm, contributing β−m×βe=βe−m.
For our example (m=3, β=2), the spacing at exponent e is 2e−3:
| Exponent e | Numbers (positive) | Spacing =2e−3 |
|---|
| −1 | 41,165,83,167 | 161 |
| 0 | 21,85,43,87 | 81 |
| 1 | 1,45,23,47 | 41 |
| 2 | 2,25,3,27 | 21 |
Verify for e=−1:
165−41=165−164=161✓
Visualising the Distribution
Notice how the numbers become more spread out as the exponent grows. Near zero, numbers are densely packed; near the maximum, they are far apart.