Skip to content

How to Convert Octal to Hexadecimal

Published: at 05:30 AM

Octal is a base-8 numbering system that uses eight digits, from 0 to 7. Hexadecimal is a base-16 numbering system that uses sixteen digits, from 0 to 9 and A to F. In order to convert an octal number to hexadecimal number, you need to first convert the octal number to binary number, and then convert the binary number to hexadecimal number.

Conversion

Here are the steps to convert an octal number to hexadecimal number:

  1. Identify the octal number you want to convert.
  2. Convert the octal number to binary number. You can use the steps outlined in our previous article on how to convert octal number to binary number to convert the octal number to binary number.
  3. Convert the binary number to hexadecimal number. You can use the table below.

Example

Here’s an example to illustrate the conversion process:

Let’s say we have the octal number 345. To convert this octal number to hexadecimal number, we need to first convert the octal number to binary number, and then convert the binary number to hexadecimal number:

  1. Convert the octal number to binary number:

    3 -> 011
    4 -> 100
    5 -> 101

    Combining these binary representations, we get the binary number 011100101.

  2. Convert the binary number to hexadecimal number:

    0111 -> 7
    0010 -> 2
    0101 -> 5

    Combining these hexadecimal digits, we get the hexadecimal number E5.

Therefore, the octal number 345 corresponds to the hexadecimal number E5.

Octal-Binary Table

OctalBinary
0000
1001
2010
3011
4100
5101
6110
7111

Binary-Hexadecimal Table

BinaryHexadecimal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F

References