## Review of number system

A number is a mathematical value used for counting or measuring or labeling objects. Numbers are used to performing arithmetic calculations. The study of number systems is one of the important processes and basic steps that is to be followed while programing a digital machine. In this chapter, we will discuss different number systems commonly used to represent data.

## Decimal Number System

The decimal number system is a radix-10 number system, therefore it has 10 different digits or symbols. These symbols are represented as 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. All higher numbers after 9 are represented in terms of these 10 digits only. The process of writing higher-order numbers after 9 consists in writing the second digit (i.e. =1) first, followed by the other digits, one by one, to obtain the next 10 numbers from 10 to 19. The next 10 numbers from 20 to 29 are obtained by writing the third digit (i.e. 2) First, followed by the digits 0 to 9, one by one. The process continues until we have exhausted all possible two-digit combinations and reached 99. Then we begin with three-digit combinations. The first three-digit number consists of the lowest two digit number followed by 0 (i.e. 100), and the process goes on endlessly.

The place values of different digits in a mixed decimal number, starting from the decimal point, are100, 101, 102 and so on (for the integer part) and10^{−1}, 10^{−2}, 10^{−3} and so on (for the fractional part). The value or magnitude of a given decimal number can be expressed as the sum of the various digits multiplied by their place values or weights.

As an illustration, in the case of the decimal number 3586.265, the integer part (i.e. 3586) can be expressed as

3586 = 3 × 10^{3} + 5 × 10^{2} + 8 × 10^{1} + 6 × 10^{0} = 3000 + 500 + 80 +6 = 3586

And the fractional part can be expressed as

265 = 2 × 10^{−1} + 6 × 10^{−2} + 5 × 10^{−3} = 0.2 + 0.06 + 0.005 = 0.265

## Binary Number

A binary number is a radix 2 number system the possible symbols in a binary number system are 0 and 1. The procedure for expressing the number in the series is the same as a decimal number system the number can be represented as 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111. Starting from the binary point, the place values of different digits in a mixed binary number are 2^{0}, 2^{1}, 2^{2} and so on (for the integer part) and2^{−1}, 2^{−2}, 2^{−3} and so on (for the fractional part).

**Advantages**

- Binary systems are widely used in logic expressions
- The binary number system is widely used by the microprocessors and microcontrollers and called as the machine level language

## Octet Number System

An octet number system is a radix 8 number system the possible symbols are (0, 1, 2, 3, 4, 5, 6 and 7). The procedure for expressing the numbers is similar to that of the decimal number system. The numbers in the series can be represented as 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 30…..

## Hexa Decimal Number system

A hexadecimal number system is a radix 8 number system the possible symbols are (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F). The procedure for expressing the number in its series is the same as that of the decimal number system. E.g. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20,….. Uses

- The hexadecimal number system is used in modern processors and microcontrollers
- Widely used in register/memory management and to represent 64 bit register and data.