# HEX to Octal

Hexadecimal to octal conversion is the process of converting a hexadecimal number, which is represented using base-16 digits (0–9 and A–F), to its equivalent octal form.

To convert a hexadecimal number to octal, you can use the following method:

1. Convert the hexadecimal number to its binary form.
2. Group the binary digits in groups of 3, starting from the rightmost digit.
3. Convert each group of 3 binary digits to its equivalent octal form.

For example, to convert the hexadecimal number 1A (octal: 32) 0001 1010 (binary) -> 001 101 -> 32

A more simple way to convert hexadecimal to octal is to use a built-in function in most programming languages, like Python's oct() function, which converts the hexadecimal number to octal after converting it to decimal by default, or by using any web conversion tools like Oumify.

Octt(int("1A", 16)) returns the octal value 32, for example.

Another way is to use the built-in int() function to convert the hexadecimal number to decimal and then use the oct() function. Octt(int("1A", 16)) returns the octal value 32, for example.

Note that the octal representation uses only digits 0–7 to represent numbers, while the hexadecimal representation uses digits 0–9 and letters A–F to represent numbers 10–15, respectively.

CEO / Co-Founder