Chapter 3Basic Arithmetic on Fixed-point Numbers
3.1 Operations on Unsigned Numbers
3.1.1 Working with Natural Binary Code
As was stated previously in section 2.1, let us recall that any number is represented on n+m bits, where n is the number bits of the integer part, and m is the number bits of the fractional part.
Addition of two (n + m)-bit BIN numbers returns the result on (n + m + 1) bits. It can be seen that for any base p this extra bit can take the value 0 or 1. Reserving bits for the fractional part is limiting the range in the integer part of the number. Appendix A gives the smallest and largest value of a number for given n and m, assuming n + m = 8 and n + m = 16 and for various position of point. ...
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.