Computer does not understand human language because it is arbitrary. But numbers are not arbitrary, and that is why we prefer numbers to communicate with computer and machines. Hence, the number system was discovered. Number System is a system through which we communicate and understand the machine. For example, for a computer 0 is OFF and 1 is ON. In this article, we will discuss different types of number systems, and their conversion rules.
Definition of Number System in Computers
In computers, Number System is defined as a writing system to represent the numbers in different ways i.e. we are using different symbols and notations to represent numbers. There are four ways we can represent the number. That is, there are four types of Number System – Binary, Decimal, Octal, Hexadecimal. Let us see each number system one by one.
Binary Number System
What is Binary Number System?
Binary Number System is a number system in which we represent the numbers by using only two symbols i.e. 0 or 1. As we saw in the above example, 0 can be OFF and 1 can be ON.
So, there are only two symbols in the Binary number system. Hence, the base value of binary numbers is 2.
Every number system has a different base value which indicates the number of ways we can represent the numbers in that number system. So, in binary, since we have only 2 ways to represent numbers the base value is 2.
Binary number system is used when there are only two possibilities or outcomes. For examples, Electric bulb can be On or Off.
Octal Number System
What is Octal Number System?
As the name says, we can define the Octal number system as a number system in which we can represent the numbers using 8 different values or digits. From 0 to 7.
Since we can represent the number using 8 different digits the base of Octal Number System is 8.
Also, there is a relationship between Binary and Octal Number system. The group of 3 binary digits makes one octal digit. Since, 2 power 3 = 8.
Decimal Number System
What is Decimal Number System?
In decimal number system we have 10 digits – 0 to 9 to represent the numbers. Hence, the base value of the Decimal Number system is 10.
Decimal number system is used when there are 10 possible outputs of a system. For example, top 10 students from a class.
Hexadecimal Number System
What is Hexadecimal Number System?
In Hexadecimal number system, we add 6 more digits to Decimal number system.
Which means hexadecimal number system is a number system in which we use 16 different values to represent the numbers
That is 0 to 9 and A to F. A, B, C, D, E, F represents 10, 11, 12, 13, 14, 15 respectively.
Number System Table – Binary, Octal, Decimal, Hexadecimal
|Number System||Base||Digits used||Examples|
|Binary||2||0 or 1||(1010111)2|
Number System Conversion Rules
Now, we will see how to convert one number system to another number system. There are three ways we can do it –
- Decimal to Other Number System
- Other number system to Decimal
- Any number system to any number system
Decimal to Other Number System
Conversion rules for converting decimal to other number system
- First step is to identify the base of target number system i.e. number system to which we have to convert the decimal number system.
- Second step is to divide the given decimal number system with that base we got in the first step and note down the remainders in each division.
- Third step is to reverse the remainder we got such that first value is LSB and last value is MSB.
Decimal to Binary Number System
Let us convert decimal number (13728)10 to binary number.
So, in the above example. We first identified 2 is the base of the binary (target number system). Then, we divided the given decimal number 13728 with the base 2. And then we noted the remainder in every step. And finally, we reversed the remainder and got the answer –
Decimal to Octal Number System
Let us take the same example and represent it into Octal number system format.
Decimal to Hexadecimal Number System
Now for converting decimal to hexadecimal, we will take the base value as 16.
Convert Any Number System to Decimal Number System
Following are the steps to convert any number system to decimal number system –
- Identify the base of the given number system, which you have to convert.
- Now assign a position to all the digits in the number starting from the right. i.e. Position of “8” in 5548 will be 0 and 4 will be 1 and so on…
- Now multiply each digit of a given number with the Base power Position.
Let us see some examples to understand this more clearly.
Binary to Decimal Number System
In the above example, we first identified the base of Binary as 2. Then, we assigned the position to each digit. Then we multiplied the digit with Base (2) power Position (BpP). And then we add the answers we got from multiplication.
Octal to Decimal Number System
Hexadecimal to Decimal Number System
Viva Questions on Number System
- How many digits are used in Binary System?
- What is the base of Octal Number System?
- How many digits are used in Decimal Number System?
A – 2, B – 8, C – 10