Types of Number System in Computer
Types of Number System:
A number is a mathematical value that uses for counting and measuring objects, and for performing arithmetic calculations. Numbers have various categories like natural numbers, whole numbers, and rational and irrational numbers. A number system is a system representing numbers. It defines a set of values to represent a quantity. So, the number system is also called a system of numeration. There are mainly four types of number systems in computers.
Binary number system:
Computer can’t understand our language. It understands only its language. A computer language is made up of a combination of 0’s and 1’s only as it can only understand these two digits. The data used by a computer may be of any type, character or numerical. But the data and instructions in any computer are stored using the digits 0 and 1. It is known as the Binary System.
So, a computer can understand only 0’s and 1’s, so a special coding technique had to be formed so that the numbers, letters and other characters could be converted into a computer-understandable format. This coded form of numbers, letters, words, etc. That is called a Binary Number System.
Example: Convert 10001010112 into decimal
10001010112 = 1 × 29 + 0 × 28 + 0 × 27 + 0 × 26 + 1 × 25 + 0 × 84 + 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20
= 1 × 512 + 0 × 256 + 0 × 128 + 0 × 64 + 1 × 32 + 0 × 16 + 1 × 8 + 0 × 4 + 1 × 2 + 1 × 1
= 512 + 0 + 0 + 0 + 32 + 0 + 8 + 0 + 2 + 1
= 55510
So, 10001010112 = 55510
It is called ‘binary’ because ‘bi’ means ‘two’. Since only two symbols are used in the binary number system. The base of this number system is 2. Each digit of this number system is called a binary digit. Through the binary number system, we use more digits to represent a number than decimal number system, as you can see in the given table:
Decimal number system:
The decimal system is a base-10 system meaning that there are 10 distinct digits-0 through 9. The weights or positions they hold determine the value that the digits represent. Many combinations of these four digits -2, 0, 4 and 8 can be made but the final value depends upon the exact position in which they are placed.
Octal number system:
Octal number system uses 8 digits such as 0,1,2,3,4,5,6 and 7. The base of the octal number is 8. Octal numbers are mainly used in computer applications.
Example: Convert 1258 into decimal
1258 = 1 × 82 + 2 × 81 + 5 × 80
= 1 × 64 + 2 × 8 + 5 × 1
= 64 + 16 + 5
= 8510
So, 1258 = 8510
Hexadecimal number system:
The hexadecimal number system uses sixteen digits/alphabets. So, the base number of it is 16. In the hexadecimal number system, at first, the numbers are represented just like in a decimal system such as 0-9. Then, the numbers are represented using the alphabet from A to F.
Example: Convert 25016 into decimal
25016 = 2 × 162 + 5 × 161 + 0 × 160
= 2 × 256 + 5 × 16 + 0 × 1
= 512 + 80 + 0
= 59210
So, 25016 = 59210