To convert from hex to octal and from octal to hex, you may use the hex and octal converter above. Also you may find the octal equivalents of hexadecimal numbers from "0" to "F" in the hex to octal table.
Below, you may find information for how to convert from hex to octal and how to convert from octal to hex, including example conversions.
How to convert hex to octal?
To convert hex to octal (base-16 to base-8), first convert the hexadecimal number into binary number and then convert the binary into octal number. These are the steps to convert from hexadecimal to octal:
1 - Separate the hexadecimal digits.
2 - Get the binary equivalent of the hexadecimal digits.
hex | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
bin | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
3 - Combine the binary digits into a single string.
4 - Starting from the last binary digit to the first, split the binary number into groups of three binary digits.
5 - If the first binary group is less than three binary digits, add "0" at the beginning of that group.
6 - For each of the binary groups, get the octal equivalent.
octal to binary table <-->
octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
binary | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
7 - Combine the octal digits into a single string.
For example, these are the steps to convert hexadecimal number "3CD" to octal:
Hex digits are 3, C and D
3DC = (3 = 0011) (C = 1100) (D = 1101)
3DC = 0011 1100 1101
3DC = 001111001101
3DC = 001 111 001 101
3DC = (001 = 1) (111 = 7) (001 = 1) (101 = 5)
3DC = 1 7 1 5
3DC = 1715
Please visit base converter to convert between all number bases.
How to convert octal to hex?
To convert from octal to hex, first convert the octal number into binary number and then convert the binary into hexadecimal number. These are the steps to convert from octal to hexadecimal:
1 - Separate the octal digits.
2 - Get the binary equivalent of the octal digits.
3 - Combine the binary digits into a single string.
4 - Starting from the last binary digit to the first, split the binary number into groups of four binary digits.
5 - If the first binary group is less than four binary digits, add "0" at the beginning of that group.
6 - For each of the binary groups, get the hexadecimal equivalent.
7 - Combine the hex digits into a single string.
For example, these are the steps to convert octal number "567" to hexadecimal:
Octal digits are 5, 6 and 7
567 = (5 = 101) (6 = 110) (7 = 111)
567 = 101 110 111
567 = 101110111
567 = 1 0111 0111
567 = 0001 0111 0111
567 = 1 7 7
567 = 177
What is Hexadecimal Numeral System?
Hexadecimal (hex) system is a base-16 numeral system that uses 16 symbols (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) to represent values from 0 to 15.
The hex numeral system is mostly used in computing to represent binary numbers in a friendly way. Each of the symbols in hex numbers are the representation of four binary bits.
To convert between hex and decimal numbers, please visit hex to decimal converter.
What is Octal Numeral System?
Octal system is a base-8 numeral system that uses 8 symbols (0,1,2,3,4,5,6,7) to represent values from 0 to 7.
The octal numeral system is mostly used in computing to represent binary numbers in a friendly way. Each of the symbols in octal numbers are the representation of three binary bits.
To convert between octal and binary numbers, please visit octal to binary converter.