# Hex to Octal Converter

Hexadecimal is a base 16 numbering system, in which each digit of a number are represented by 16 possible characters. These chracters are 0-9 and A-F. Hexadecimal is widely used when representing binary numbers, as they can perfectly represent a byte using only two digits.

Hexadecimal is an excellent way to represent large decimal numbers as you need less digits to represent the same number. For a classic 32 bit integer, you only need 8 hex digits to represent the maximum value, as opposed to the 11 required when using classical base 10 representations. Even numbers are nice!

Octal is also useful in the context of computer science, especially for representing values that fit evenly into multiples of three bit quantities. One possible way to convert from hexadecimal to octal is to first transform the hexadecimal number to binary, and then transform the binary number to an octal number. You can use the given tables to do so.

### Example

Converting `f0a183b16` to octal:

`f0a183b16 = 11110000101000011000001110112`

`11110000101000011000001110112 = 17024140738`

Thus, `f0a183b16 = 17024140738`

### Conversion Tables

Hex4-bit BinaryHex4-bit Binary3-bit BinaryOct
00000810000000
10001910010011
20010A10100102
30011B10110113
40100C11001004
50101D11011015
60110E11101106
70111F11111117