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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access