Hexadecimal to Octal and Octal to Hexadecimal :
To convert Hexadecimal to Octal, Convert each digit of Hexadecimal Number to it’s binary equivalent and write them in 4 bits. Then, combine each 3 bit binary number and that is converted into octal.
Example
Convert the Hexadecimal number (A42)16 to its Octal equivalent.
A | 4 | 2
1010 | 0100 | 0010
101 | 001 | 000 | 010
Answer : (5102)8
To convert Octal to hexadecimal, convert each digit of Octal Number to it’s binary equivalent and write them in 3 bits. Then, combine each 4 bit binary number and that is converted into hexadecimal.
Example
Convert the Octal number (762)8 to its hexadecimal equivalent.
7 | 6 | 2
101 | 110 | 010
0001 | 0111 | 0010
Answer : (172)16