How to convert Hexadecimal to Octal
Converting a hexadecimal number from hexadecimal system to octal system we need to apply two steps :
- Convert the hexadecimal number to its binary equivalent.
- Convert the binary number to octal.
Converting a hexadecimal number from Hexadecimal system to Binary system we need to convert four bit binary value corresponding for each digit of hexadecimal number.
Hexadecimal | 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 |
Converting a binary number from Binary system to octal (base-8) system we need to groupping three digit sets from right to left of binary number.
If there are not enough digits for a set then fill the zeros to left side to three digits.
Get each group's octal equivalent.
Binary | Octal |
000 | 0 |
001 | 1 |
010 | 2 |
011 | 3 |
100 | 4 |
101 | 5 |
110 | 6 |
111 | 7 |
Read the octal equivalent from left to right, which is the octal value of the binary number obtained in Step 1.
Let's see an example. Hexadecimal number is 1AC :
- 1 corresponds to 0001 in binary
- A corresponds to 1010 in binary
- C corresponds to 1100 in binary
- Group the binary digits into sets of three : 000 110 101 100
- 000 corresponds to 0 in octal
- 110 corresponds to 6 in octal
- 101 corresponds to 5 in octal
- 100 corresponds to 4 in octal
- Concatenate the octal values from left to right : 0654
The hexadecimal number 1AC is equivalent to the octal number 0654.