Best uses
- Convert between base-16 and base-8 notation.
- Check computer science exercises involving several bases.
- Understand how compact number systems relate to binary.
To convert hexadecimal to octal, first convert each hexadecimal digit to its 4-bit binary equivalent. Then group the binary digits into sets of three and convert each group to octal. Add leading or trailing zeros only when needed to complete a group.
The conversion has two stages: hexadecimal to binary, then binary to octal. Here is an example:
(A7.62)16 = (?)8
| Hexadecimal= | A | 7 | . | 6 | 2 |
|---|---|---|---|---|---|
| Arrow= | ↓ | ↓ | . | ↓ | ↓ |
| Chunk= | ________ | ________ | . | ________ | ________ |
| Binary= | 1 0 1 0 | 0 1 1 1 | . | 0 1 1 0 | 0 0 1 0 |
| Binary= | 0 1 0 | 1 0 1 | 1 1 1 | . | 0 1 1 | 0 0 0 | 1 0 0 |
| Chunk= | _______ | _______ | _______ | . | _______ | _______ | _______ |
|---|---|---|---|---|---|---|---|
| Arrow= | ↓ | ↓ | ↓ | . | ↓ | ↓ | ↓ |
| Octal= | 2 | 4 | 7 | . | 3 | 0 | 4 |
Hexadecimal and octal are both compact ways to represent binary values. Hexadecimal groups binary digits in sets of four, while octal groups them in sets of three. This conversion is helpful when comparing examples from different textbooks, older computing systems, file permission material, or digital logic exercises.
| Hexadecimal | Octal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 10 |
| 9 | 11 |
| A | 12 |
| B | 13 |
| C | 14 |
| D | 15 |
| E | 16 |
| F | 17 |
A dependable way to convert hexadecimal to octal is to convert hex to binary first, then regroup the binary digits into sets of three.
Using binary as a bridge is easier because hex maps to four bits and octal maps to three bits.
Yes. A through F are valid hexadecimal digits and represent 10 through 15.