Conversion of Binary to other base number system like conversion of Binary to Decimal Conversion, Binary to Octal Conversion, and Binary to Hexadecimal Conversion.
Note
MSB
MSB (Most Significant Bit) is the leftmost digit is the most significant digit of a number.
LSB
LSB (Least Significant Bit) is the rightmost digit is the least significant digit of a number.
Conversion of Binary Number to Decimal Number
What is Binary Number? Binary number contained only two digits or bits; 0and 1. Therefore, base of the system is 2. For Example, (100)2. Here base is 2. What is Decimal Number? Decimal number system has basic digits 0 to 9. The base of the decimal system is 10. Example, (47)10. Here base is 10.
For Example
To convert the binary number (1101)2 to a decimal number ( )10, we use the Multiplication method.
Steps | Description | Solution |
---|---|---|
1 | Write down the binary number | (1101)2 |
2 | Count right to left of the binary number. | 3 2 1 0 1 1 0 12 |
3 | List the powers of two from right to left. Start at 20, evaluating it as “1”. Increment the exponent by one for each power. |
3 2 1 0 1 1 0 1 23 22 21 20 |
4 | Multiply each digit of the binary number by the corresponding power of 2 | 1×23 + 1×22 + 0x21 + 1×20 |
5 | Add all the numbers to get the decimal equivalent. | = 1×23 + 1×22 + 0x21 + 1×20 = 1×8 + 1×4 + 0x2 + 1×1 = 8 + 4 + 0 + 1 = 13 (1101)2 = (13)10 |
Binary Number to Octal Number Conversion
What is Octal Number? The number to the base 8 is called octal numbers. It uses the numbers from 0 to 7. There are mainly two ways to convert binary number to octal number.
Indirect Method
In indirect method first we need to convert binary number to decimal number then we can convert that decimal number to octal number.
For Example
Convert binary number (1101)2 to octal number ( )8
A) First, we convert binary number (1101)2 to decimal number ( )10, we use the Multiplication method. Binary to Decimal Conversion
B) Secondly, we convert decimal number ( )10 to Octal number ( )8, we use the Division method.
Steps | Description | Solution |
---|---|---|
1 | Divide decimal number by 8 until quotient is 0. | 13/8 = 1 Remainder is 5 1/8 = 0 Remainder is 1 |
2 | The last remainder obtained from the division is the most significant bit (MSB) of the binary number. Hence arrange the number from the most significant bit (MSB) to the least significant bit (LSB). Read from the bottom (MSB) to top (LSB) as 2. | (13)10 = (15)8 |
Binary number (1101)2 to Octal number (15 )8
Direct Method
In this method, we grouped binary number and replace their equivalent octal number. Group the binary bits into groups of 3 starting from LSB. Convert each group into its equivalent decimal. As the number of bits in each group is restricted to 3, the decimal number will be same as octal number.
For Example
Convert binary number (1101)2 to octal number ( )8
Steps | Description | Solution |
---|---|---|
1 | Write down the binary number | (1101)2 |
2 | Group all the digits in sets of three starting from the LSB (far right). Add zeros to the left of the last digit if there aren’t enough digits to make a set of three. | 001 101 |
3 | Use the table below to convert each set of three into an octal digit. | 001 = 1 101 = 5 (1101)2 = (15)8 |
Binary Number to Hexadecimal Number Conversion
What is Hexadecimal Number? The number to the base 16 is called Hexadecimal numbers. It uses the numbers from 0 to 9, A, B, C, D, E, and F. There are mainly two ways to convert binary number to hexadecimal number.
Indirect Method
In indirect method first we need to convert binary number to decimal number then we can convert that decimal number to hexadecimal number.
For Example
Convert binary number (1101)2 to hexadecimal number ( )16
A) First, we convert binary number (1101)2 to decimal number ( )10, we use the Multiplication method. Binary to Decimal Conversion.
B) Secondly, we convert decimal number ( )10 to hexadecimal number ( )16, we use the Division method.
Steps | Description | Solution |
---|---|---|
1 | Divide decimal number by 16 until quotient is 0. | 13/16 = 0 Remainder is 13 |
2 | The last remainder obtained from the division is the most significant bit (MSB) of the binary number. Hence arrange the number from the most significant bit (MSB) to the least significant bit (LSB). Read from the bottom (MSB) to top (LSB) as 13. D is the hexadecimal equivalent of decimal number 13 . | (13)10 = (D)16 |
Binary number (1101)2 to Hexadecimal number (D )16
Direct Method
In this method, we grouped binary number and replace their equivalent hexadecimal number. Group the binary bits into groups of 4 starting from LSB. Convert each group into its equivalent decimal. As the number of bits in each group is restricted to 4, the decimal number will be same as hexadecimal number.
For Example
Convert binary number (1101)2 to hexadecimal number ( )16
Steps | Description | Solution |
---|---|---|
1 | Write down the binary number | (1101)2 |
2 | Group all the digits in sets of four starting from the LSB (far right). Add zeros to the left of the last digit if there aren’t enough digits to make a set of three. | 1101 |
3 | Use the table below to convert each set of four into hexadecimal digit. | 1101 = D So, D is the hexadecimal equivalent to the decimal number 1101. (1101)2 = (D)16 |