Octal to Hexadecimal Conversion



Octal to Hexadecimal Conversion

The conversion of octal to hexadecimal is very simple. We first convert the given octal number to binary and then the binary number to the hexadecimal.

The step-by-step process to convert a given octal number to its equivalent hexadecimal is given below −

Step 1 − Convert each digit of the given octal number to its equivalent binary of 3-bits.

Step 2 − Make groups of 4 bits each of the obtained binary number.

Step 3 − Convert each 4-bit binary group to its equivalent hexadecimal.

Let us see some examples to understand the conversion of octal to hexadecimal.

Example 1

Convert (742.35)8 to hexadecimal.

Solution

The conversion of given octal number to hexadecimal is explained below −

Octal Digits 3-bit Binary 4-bit Binary Hex Digits
7 111 0001 1
4 100 1110 E
2 010 0010 2
. . . .
3 011 0111 7
5 101 0100 4

Thus, the hexadecimal equivalent of the given octal number is (1E2.74)16.

Example 2

Convert (1523.742)8 to hexadecimal.

Solution

The following table demonstrates the conversion of given octal number to hexadecimal −

Octal Digits 3-bit Binary 4-bit Binary Hex Digits
1 001 0000 0
5 101 0011 3
2 010 0101 5
3 011 0011 3
. . . .
7 111 1111 F
4 100 0001 1
2 010 0000 0

Hence, the hexadecimal equivalent of the given octal number is (353.F1)16.

Advertisements