As we know, the number system is a form of expressing the numbers. In number system conversion, we will study to convert a number of one base, to a number of another base. There are a variety of different number systems such as binary numbers, decimal numbers, hexadecimal numbers, octal numbers, which can be exercised.
In this article, we will learn the conversion of one base number to another base number considering all the base numbers such as decimal, binary, octal and hexadecimal with the help of examples. Here, the following number system conversion methods are explained.
- Binary to Decimal Number System
- Decimal to Binary Number System
- Octal to Binary Number System
- Binary to Octal Number System
- Binary to Hexadecimal Number System
- Hexadecimal to Binary Number System
Get the pdf of number system with a brief description in it. The general representation of number systems are;
Decimal Number – Base 10 – N_{10}
Binary Number – Base 2 – N_{2}
Octal Number – Base 8 – N_{8}
Hexadecimal Number – Base 16 – N_{16}
Number System And Base Conversion Methods
Number system conversions deal with the operations to change the base of the numbers. For example, to change a decimal number with base 10 to binary number with base 2. We can also perform the arithmetic operations like addition, subtraction, multiplication on the number system. Here, we will learn the methods to convert the number of one base to the number of another base starting with decimal number systems. The representation of number system base conversion in general form for any base number is;
(Number)_{b} = d_{n-1 }d_{n-2}—–_{.}d_{1} d_{0 . }d_{-1 }d_{-2 }—- d_{-m}
In the above expression, d_{n-1 }d_{n-2}—–_{.}d_{1} d_{0 }represents the value of integer part and d_{-1 }d_{-2 }—- d_{-m} represents the fractional part.
Also, d_{n-1 } is the Most significant bit (MSB) and d_{-m } is the Least significant bit (LSB).
Now let us learn, conversion from one base to another.
Related Topics | |
Binary Number System | Hexadecimal Number System |
Octal Number System | Number System For Class 9 |
Decimal to Other Bases
Converting decimal number to other base numbers is easy. We have to divide the decimal number by the converted value of the new base.
Decimal to Binary Number:
Suppose if we have to convert a decimal to binary, then divide the decimal number by 2.
ExampleÂ 1.Â Convert (25)_{10 }to binary number.
Solution: Let us create a table based on this question.
Operation | Output | Remainder |
25 Ã· 2 | 12 | 1(MSB) |
12 Ã· 2` | 6 | 0 |
6 Ã· 2 | 3 | 0 |
3 Ã· 2 | 1 | 1 |
1 Ã· 2 | 0 | 1(LSB) |
Therefore, from the above table, we can write,
(25)_{10 }= (11001)_{2}
Decimal to Octal Number:
To convert decimal to octal number we have to divide the given original number by 8 such that base 2 changes base 8. Let us understand with the help of an example.
Example 2: Convert 128_{10} to octal number.
Solution: Let us represent the conversion in tabular form.
Operation | OutputÂ | Remainder |
128Ã·8 | 16 | 0(MSB) |
16Ã·8 | 2 | 0 |
2Ã·8 | 0 | 2(LSB) |
Therefore, the equivalent octal number is 200_{8}
Decimal to Hexadecimal:
Again in decimal to hex conversion, we have to divide the given decimal number by 16.
Example 3: ConvertÂ Â 128_{10} to hex.
Solution: As per the method, we can create a table;
Operation | OutputÂ | Remainder |
128Ã·16 | 8 | 0(MSB) |
8Ã·16 | 0 | 8(LSB) |
Therefore, the equivalent hexadecimal number is 80_{16}
Here MSB stands for a Most significant bit and LSB stands for a least significant bit.
Other Base System to Decimal Conversion
Binary to Decimal:
In this conversion, binary number to a decimal number, we use multiplication method, in such a way that, if a number with base n has to be converted into a number with base 10, then each digit of the given number is multiplied from MSB to LSB with reducing the power of the base. Let us understand this conversion with the help of an example.
Example 1. Convert (1101)_{2 } into decimal number.
Solution: Given a binary number (1101)_{2}.
Now, multiplying each digit from MSB to LSB with reducing the power of the base number 2.
1 Ã— 2^{3} + 1 Ã— 2^{2 }+ 0 Ã— 2^{1} + 1 Ã— 2^{0}
= 8 + 4 + 0 + 1
= 13
Therefore, (1101)_{2 } = (13)_{10}
Octal to Decimal:
To convert octal to decimal, we multiply the digits of octal number with decreasing power of the base number 8, starting from MSB to LSB and then add them all together.
Example 2: Convert 22_{8} to decimal number.
Solution: Given, 22_{8}
2 x 8^{1} + 2 x 8^{0}
= 16 + 2
= 18
Therefore, 22_{8Â }= 18_{10}
Hexadecimal to Decimal:
Example 3: Convert 121_{16} to decimal number.
Solution: 1 x 16^{2 } + 2 x 16^{1Â } + 1 x 16^{0}
= 16 x 16 + 2 x 16 + 1 x 1
= 289
Therefore, 121_{16} = 289_{10}
Hexadecimal to Binary Shortcut Method
To convert hexadecimal numbers to binary and vice versa is easy, you just have to memorize the table given below.
Hexadecimal Number | Binary |
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |
A | 1010 |
B | 1011 |
C | 1100 |
D | 1101 |
E | 1110 |
F | 1111 |
You can easily solve the problems based on hexadecimal and binary conversions with the help of this table. Let us take an example.
Example:Â Convert (89)_{16 } into a binary number.
Solution: From the table, we can get the binary value of 8 and 9, hexadecimal base numbers.
8 = 1000 and 9 = 1001
Therefore, (89)_{16 }= (10001001)_{2}
Octal to Binary Shortcut Method
To convert octal to binary number we can simply use the table. Just like having a table for hexadecimal and its equivalent binary, in the same way, we have a table for octal and its equivalent binary number.
Octal Number | Binary |
0 | 000 |
1 | 001 |
2 | 010 |
3 | 011 |
4 | 100 |
5 | 101 |
6 | 110 |
7 | 111 |
Example:Â Convert (214)_{8 }into a binary number.
Solution: From the table, we know,
2 â†’ 010
1 â†’ 001
4 â†’ 100
Therefore,(214)_{8} = (010001100)_{2}
Learn more about number system with us and download BYJUâ€™S- The Learning App for interesting and interactive videos.