Octal to Hexadecimal Conversion Steps and Examples

This post was written and distributed with the intention of elaborating on the processes that can be applied in order to convert a number written in the octal number system to the hexadecimal number system. But before we get started, let's first discuss what these two numbers mean.

Octal to Hexadecimal Formula

To convert any octal number to the hexadecimal system, we must first convert the octal number to binary, and then the binary number to hexadecimal.

For example, (435)8 = ( ? )16

We have to convert the above number, 435, given in the octal system, into the hexadecimal number system. then we have to convert its binary equivalent. The figure given below shows its binary equivalent, or the binary equivalent of 435.

octal to binary number

According to the figure given above, we have 100 011 101 as the value, which is the binary equivalent of the octal number 435. Now let's convert it into the hexadecimal system. Or we have to calculate: (100011010)2 = ( ? )16

Before proceeding, we have to make 4-4 pairs of binary bits, and here we have a total of 9 digits; therefore, to make 4-4 pairs, we have to add 3 zeros before the number; after adding three zeros, we have 000100011101. Now make 4 pairs and convert each pair into its hexadecimal equivalent, as shown in the figure given below.

number system types conversion

According to the above figure, the hexadecimal equivalent is 11D. Therefore, (435)8 = (11D)16.

Octal to Hexadecimal Steps

Let's say the octal number that has been provided to us is 1452. Now that you've got that out of the way, give the information contained in the following box your full attention:

1     4     5     2     (write all octal digits)
001   100   101   010   (write its binary equivalent)

001100101010            (combine all binary digits)

0011  0010  1010        (make a 4-4 binary pair)
3     2     10          (write the decimal equivalent of each binary pair)
3     2     A           (convert digits 10 to 15 into characters A to F)
= 32A

As you can see from the above box:

If any digit greater than 9 is available as a decimal digit, then convert it into a character as told above. Therefore, from the above box, the hexadecimal equivalent of the given octal number 1452 is 32A. You can also write (1452)8 = (32A)16.

Programs Created on Octal to Hexadecimal Conversion

Computer Fundamentals Quiz


« Previous Tutorial Next Tutorial »