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**

Octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |

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

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

**Table #2: Octal to binary conversion table**

Octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Binary | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |

**Table #3: Binary to hexadecimal conversion table**

Binary | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |

Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |

**Example #1: Convert octal 157 into hexadecimal**

Step description | Result |
---|---|

Translate 157 into binary | 001 101 111 |

Drop one leading zero in order to achieve groups of 4 binary digits | 0110 1111 |

Resulting hexadecimal number |
6F |

**Example #2: Convert octal 5026 into hexadecimal**

Step description | Result |
---|---|

Translate 5026 into binary | 101 000 010 110 |

Form groups of 4 binary digits | 1010 0001 0110 |

Resulting hexadecimal number |
A16 |

Convert octal to hexadecimal numbers.

Convert hexadecimal to octal numbers.

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