Main Content

Determine the Range of Fixed-Point Numbers

Fixed-point variables have a limited range for the same reason they have limited precision — because digital systems represent numbers with a finite number of bits. As a general example, consider the case where an integer is represented as a fixed-point word of size ws. The range for signed and unsigned words is given by



min(Q)={0           unsigned,2ws1  signed,max(Q)={ 2ws1   unsigned,  2ws11signed.  

Using the general [Slope Bias] encoding scheme described in Scaling, the approximate real-world value has the range



min(V˜)={B                           unsigned,F2E(2ws1)+B  signed,max(V˜)={ F2E(2ws1)+B   unsigned,  F2E(2ws11)+B signed.  

If the real-world value exceeds the limited range of the approximate value, then the accuracy of the representation can become significantly worse.