Appendices
Appendix A. Range of numbers
Numerical range for BIN, 2's and SM formats for assumed n and m, where n is the number of bits of the integer part (quotient), m is the number of bits of the fractional part.
n |
m |
Resolution 2−m |
Range for decimal format |
||
---|---|---|---|---|---|
BIN |
2's |
SM |
|||
8 |
0 |
1.0 |
0:255 |
−128:127 |
−127:127 |
7 |
1 |
0.5 |
0:127.5 |
−64:63.5 |
−63.5:63.5 |
6 |
2 |
0.25 |
0:63.75 |
−32:31.75 |
−31.75:31.75 |
5 |
3 |
0.125 |
0:31.875 |
−16:15.875 |
−15.875:15.875 |
4 |
4 |
0.0625 |
0:15.9375 |
−8:7.9375 |
−7.9375:7.9375 |
3 |
5 |
0.03125 |
0:7.96875 |
−4:3.96875 |
−3.96875:3.96875 |
2 |
6 |
0.015625 |
0:3.984375 |
−2:1.984375 |
−1.984375: 1.984375 |
1 |
7 |
0.0078125 |
0:1.9921875 |
−1:0.9921875 |
−0.9921875: 0.9921875 |
0 |
8 |
0.00390625 |
0:0.99609375 |
−0.5:0.49609375 |
−0.49609375:0.49609375 ... |
Get Computer Arithmetic in Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.