Conversion of binary numbers to octal or hexa-decimal numbers and vice-versa may be accomplished very easily.
Since a string of 3 bits can have 8 different permutations, it follows that each 3-bit string is uniquely represented by one octal digit. Similarly, since a string of 4 bits has 16 different permutations each 4 bit string represents a hexa-decimal digit uniquely. The table below gives the decimal numbers 0 to 15 and their binary, octal and hexa-decimal equivalents and also the corresponding 3-bit and 4-bit strings.
Conversion of binary numbers to octal or hexa-decimal numbers and vice versa:
Conversion Table |
|||||||
---|---|---|---|---|---|---|---|
Decimal | Binary | Octal | 3-bit String | Hexa-decimal | 4-bit String | ||
0 | 0 | 0 | 000 | 0 | 0000 | ||
1 | 1 | 1 | 001 | 1 | 0001 | ||
2 | 10 | 2 | 010 | 2 | 0010 | ||
3 | 11 | 3 | 011 | 3 | 0011 | ||
4 | 100 | 4 | 100 | 4 | 0100 | ||
5 | 101 | 5 | 101 | 5 | 0101 | ||
6 | 110 | 6 | 110 | 6 | 0110 | ||
7 | 111 | 7 | 111 | 7 | 0111 | ||
8 | 1000 | 10 | - | 8 | 1000 | ||
9 | 1001 | 11 | - | 9 | 1001 | ||
10 | 1010 | 12 | - | A | 1010 | ||
11 | 1011 | 13 | - | B | 1011 | ||
12 | 1100 | 14 | - | C | 1100 | ||
13 | 1101 | 15 | - | D | 1101 | ||
14 | 1110 | 16 | - | E | 1110 | ||
15 | 1111 | 17 | - | F | 1111 |
Thus to convert a binary number to its octal equivalent we arrange the bits into groups of 3 starting at the binary point and move towards the MSB. We then replace each group by the corresponding octal digit. If the number of bits is not a multiple of 3, we add necessary number of zeros to the left of MSB. For binary fractions, we have to work towards the right of the binary point and follow the same procedure. Similarly, for conversion of octal numbers to binary numbers, we have to replace each octal digit by its 3-bit binary equivalent.
The same procedure is to be adopted in the case of hexa-decimal numbers and vice versa by converting the given numbers to binary numbers first with the help of above procedure and then converting these binary numbers to hexa-decimal numbers. Conversion to decimal may also be accomplished by the same procedure.
Following examples on conversion of binary numbers to octal or hexa-decimal numbers and vice versa will elucidate the working method:
1. Convert the following to octal numbers:
From Conversion of Binary Numbers to Octal or Hexa-decimal Numbers to HOME PAGE
Didn't find what you were looking for? Or want to know more information about Math Only Math. Use this Google Search to find what you need.
Jun 13, 24 02:51 AM
Jun 13, 24 02:28 AM
Jun 13, 24 12:11 AM
Jun 12, 24 01:11 PM
Jun 11, 24 07:15 PM
New! Comments
Have your say about what you just read! Leave me a comment in the box below. Ask a Question or Answer a Question.