Computer Science · Ch 2 — Encoding Schemes and Number System
Decimal Number System
Decimal Number System
The decimal number system is the one we use in day-to-day life. It is known as the base-10 system, because it uses 10 digits — 0 to 9.
The two values every digit carries
In a positional system, a number is presented through two values for each digit:
- Symbol value — which digit it is (any of 0 to 9), and
- Positional value — the weight of the place it occupies, expressed in terms of the base (a power of 10).
Worked example — the parts of 237.25
Figure 2.4 splits the decimal number 237.25 into its integer part and fractional part and computes the number from positional values:
Digits : 2 3 7 . 2 5
└── integer part ──┘ └ fraction part ┘
Integer part → positive powers of 10:
2 x 10^2 + 3 x 10^1 + 7 x 10^0 = 200 + 30 + 7
Fraction part → negative powers of 10:
2 x 10^-1 + 5 x 10^-2 = 0.2 + 0.05
Total : 200 + 30 + 7 + 0.2 + 0.05 = (237.25)10
``` …
Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.
This figure dissects the decimal number 237.25 to show how its integer part and fractional part take, respectively, the positive and negative powers of the base 10.
Across the top, the number is written as separated digits: 2 3 7 . 2 5. Above the digits float two labelled green ellipses that classify the two halves:
- One ellipse, labelled "Positive powers of 10 (Integer part)", sends three arrows down to the digits 2, 3 and 7 — the digits before the point.
- The other ellipse, labelled "Negative powers of 10 (Fractional part)", sends two arrows down to the digits 2 and 5 — the digits after the point.
Below the digits, a light-green strip writes out the products each digit contributes:
2 x 10^2 + 3 x 10^1 + 7 x 10^0 2 x 10^-1 + 5 x 10^-2
and the next line evaluates them:
200 + 30 + 7 .2 + .05 = (237.25)10
Finally, two curly braces underneath group the terms: the left brace collects 200 + 30 + 7 as the Integer part, and the right brace collects .2 + .05 as the Fraction Part. …