Number systems
The number system is a systematic way of representing numbers. It defines the set of values used to represent a quantity. The numbers are the mathematical value used to count, compute or measure the task or event that occurred.
The number is composed of digits. Each digit in a number has its own value. It is determined by the digit, position in the number, and the base of the number system. It is used for performing arithmetic calculations such as addition, subtraction, multiplication and division.
In general, numbers can be classified in many ways such as natural numbers, counting numbers, prime numbers, whole numbers, rational and irrational numbers, etc., The natural numbers are also called positive numbers(1, 2, 3, …). The natural numbers, their negative equivalents, and 0 make up the integers. Natural numbers are also called counting numbers because they do not include zero.
Number systems play an important role in digital computers. A computer system process the information and perform the calculations with binary numbers, that is only o and 1.
In digital electronics, the number system is used for representing information. The logic circuits perform their operation considering the binary numbers.
Types of Number system
There are a number of ways to represent numbers. The most popular types of number systems are Decimal number system, Binary number system, Octal number system and Hexadecimal number system. These number systems are also called positional number systems.
Decimal Number system
The decimal number system is the number system that we use in our day-to-day activities. The decimal number system consists of 10 numbers from 0 to 9. The examples of decimal numbers are 23, 420, 8503, 45.68, etc.
Since it has 10 digits, the base of the decimal number system is 10. The decimal number can be expressed in units, tens, hundreds, thousands and so on. In the decimal number system, the weight of each digit is expressed as a power of 10.
For example, the decimal number 2647 consists of the digit 7 in the units position, 4 in the tens position, 6 in the hundreds position, and 2 in the thousands position, and its value can be written as
= (2 * 103) + (6 * 102) + (4 * 101) + (7 * 100)
= 2000 + 600 + 40 + 7 =(2647)10
In the above example, the leftmost digit(2) has the greatest weight and is called the most significant digit(MSD). The rightmost digit(7) has the least weight and is called the least significant digit(LSD).
The Decimal system is the most commonly used number system. It is because humans have five fingers in each hand, through which they perform simple calculations.
Binary Number System
The binary number system is used in modern computer systems to process information, store and do calculations. It is also used in digital circuits to perform logic operations.
The Binary number system uses only two digits, 0 and 1. Some examples of binary numbers are 101, 11011, 1010.01, etc.
Since it has only two digits, it has a base value of 2 and so-called binary digits(bits). The weight of each digit in the binary numbers is expressed as a power of 2.
For example, let us consider the binary number (10101.01)2.
The decimal equivalent of the above binary number can be obtained as
= (1 * 24) + (0 * 23) + (1 * 22) + (0 * 21) + (1 * 20) + (0 * 2-1) + (1 * 2-2)
= (21.25)10
Octal Number System
The octal number system is used in modern computing systems, aviation systems, etc. The Octal number system uses eight digits 0, 1, 2, 3, 4, 5, 6 and 7. It has a base value of 8 and is so-called octal number system. Some examples of octal numbers are 675, 543, etc.,
The octal number does not include the numbers 8 and 9. Instead, the next digit after 7 will be 10, 11, 12 and so on. The weight of each digit in the octal number is expressed as a power of 8.
For example, let us consider the octal number (645.97)8.
The decimal equivalent of the above octal number can be obtained as
= (6 * 82) + (4 * 81) + (5 * 80) + (9 * 8-1) + (7 * 8-2)
= (422.2343)10
The advantage of this number system is that it has lesser digits when compared to the decimal number system and hexadecimal number system. Hence, there would be only fewer computational errors.
Hexadecimal Number system
The hexadecimal number system is used extensively for microprocessors and programming in computers. It is also used to describe locations in memory for every byte.
Hexadecimal number system uses 10 digits and 6 letters(16 characters) : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. It has a base value of 16 and called base-16 system. The weight of each digit in the hexadecimal number is expressed as a power of 16.
For example, let us consider a hexadecimal number (3FD.84)16 .
The decimal equivalent of the above hexadecimal number can be obtained as
= (3 * 162) + (F * 161) + (D * 160) + (8 * 16-1) + (4 * 16-2)
= (1021.5156)10
This number system uses less memory to store more numbers. It is very easy to convert from hexadecimal system to binary system and vice-versa.
Relation between Binary, decimal, octal and hexadecimal numbers
Decimal | Binary | Octal | Hexadecimal |
---|---|---|---|
0 | 0000 | 0 | 0 |
1 | 0001 | 1 | 1 |
2 | 0010 | 2 | 2 |
3 | 0011 | 3 | 3 |
4 | 0100 | 4 | 4 |
5 | 0101 | 5 | 5 |
6 | 0110 | 6 | 6 |
7 | 0111 | 7 | 7 |
8 | 1000 | 10 | 8 |
9 | 1001 | 11 | 9 |
10 | 1010 | 12 | A |
11 | 1011 | 13 | B |
12 | 1100 | 14 | C |
13 | 1101 | 15 | D |
14 | 1110 | 16 | E |
15 | 1111 | 17 | F |
What is Radix or Base of a Number System?
Each number system has ‘r’ set of digits or characters. For example, the decimal number system has 10 independent digits(0 to 9). Hence it is called the base-10 system. Similarly, the binary number system has 2 independent digits(0 and 1) and is so-called a base-2 system.
Thus the base or radix of the number system is defined as the total number of independent digits or characters used in the number system.
The following table shows the radix or base of different number systems.
Radix or Base, r | Independent Digits or Set of Characters | Number System |
---|---|---|
2 | 0, 1 | Binary Number System |
3 | 0, 1, 2 | – |
4 | 0, 1, 2, 3 | – |
5 | 0, 1, 2, 3, 4 | – |
6 | 0, 1, 2, 3, 4, 5 | – |
7 | 0, 1, 2, 3, 4, 5, 6 | – |
8 | 0, 1, 2, 3, 4, 5, 6, 7 | Octal Number System |
9 | 0, 1, 2, 3, 4, 5, 6, 7, 8 | – |
10 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | Decimal Number System |
11 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A | – |
.. | .. | .. |
16 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F | Hexadecimal Number System |
very useful