Chapter 23. Fixed Point, Floating Point
Numbers are numbers, and in most of our daily lives we drift casually between whole numbers, fractions, and percentages. We buy half a carton of eggs and pay 8 ¼ percent sales tax with money earned getting time-and-a-half for working 2 ¾ hours overtime. Most people are fairly comfortable—if not necessarily proficient—with numbers such as these. We can even hear a statistic like “the average American house-hold has 2.6 people” without gasping in horror at the widespread mutilation that must have occurred to achieve this.
Yet this interchange between whole numbers and fractions isn’t so casual when it comes to computer memory. Yes, everything is stored in computers in the form of bits, which means that everything ...
Get Code: The Hidden Language of Computer Hardware and Software, First Edition 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.