How to convert Octal to Hexadecimal

The octal numeral system is a numbering system that is based on 8 digits: 0, 1, 2, 3, 4, 5, 6, 7. It used to be popular in the early days of computing when it was primarily used for counting inputs and outputs, one byte at a time.

On the other hand, hexadecimal system is probably more familiar as a numeral system that is also used in computers and other digital systems. It is base 16 and it has 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, F.

Table #1: Octal to hexadecimal conversion table

Octal012345671011121314151617
Hexadecimal0123456789ABCDEF

The easiest way to convert octal to hexadecimal numbers is probably through binary conversion.

  1. Start with any octal number
  2. Translate it into binary system by swapping each octal digit with the equivalent group of three binary digits
  3. Drop any leading zeros from the resulting binary number, or pad it with zeros in order to achieve groups of four digits
  4. Convert binary representation of the octal number into hexadecimal

Table #2: Octal to binary conversion table

Octal01234567
Binary000001010011100101110111

Table #3: Binary to hexadecimal conversion table

Binary0000000100100011010001010110011110001001101010111100110111101111
Hexadecimal0123456789ABCDEF

Example #1: Convert octal 157 into hexadecimal

Step descriptionResult
Translate 157 into binary001 101 111
Drop one leading zero in order to achieve groups of 4 binary digits0110 1111
Resulting hexadecimal number6F

Example #2: Convert octal 5026 into hexadecimal

Step descriptionResult
Translate 5026 into binary101 000 010 110
Form groups of 4 binary digits1010 0001 0110
Resulting hexadecimal numberA16

Convert octal numbers to hexadecimal values.

Convert hexadecimal numbers to octal numbers.

Explore the manual conversion process between hexadecimal and octal numbering systems.


Have feedback or questions?

Please, do let us know and we'll see what we can do for you.

0/2000