2.2. 2.2 Numbering Systems

Most modern computer systems do not represent numeric values using the decimal system. Instead, they typically use a binary or two's complement numbering system. To understand the limitations of computer arithmetic, you must understand how computers represent numbers.

2.2.1. 2.2.1 A Review of the Decimal System

You've been using the decimal (base 10) numbering system for so long that you probably take it for granted. When you see a number like "123," you don't think about the value 123; rather, you generate a mental image of how many items this value represents. In reality, however, the number 123 represents

1*102 + 2 * 101 + 3*100

or

100+20+3

In the positional numbering system, each digit appearing to the left of the decimal ...

Get Art of Assembly Language, 1st 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.