The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right). For example, the binary representation for decimal 74 is 1001010. Two zeroes can be added at the left: (00)1 001 010, corresponding the octal digits 1 1 2, yielding the octal representation 112.
octal (base 8) | hexadecimal (base 16) | octal (base 8) | hexadecimal (base 16) |
---|---|---|---|
1 | = 1 | 13 | = b |
2 | = 2 | 14 | = c |
3 | = 3 | 15 | = d |
4 | = 4 | 16 | = e |
5 | = 5 | 17 | = f |
6 | = 6 | 20 | = 10 |
7 | = 7 | 21 | = 11 |
10 | = 8 | 22 | = 12 |
11 | = 9 | 23 | = 13 |
12 | = a | 24 | = 14 |
In mathematics and computing, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a, b, c, d, e, f) to represent values ten to fifteen.
hexadecimal (base 16) | octal (base 8) | hexadecimal (base 16) | octal (base 8) |
---|---|---|---|
1 | = 1 | b | = 13 |
2 | = 2 | c | = 14 |
3 | = 3 | d | = 15 |
4 | = 4 | e | = 16 |
5 | = 5 | f | = 17 |
6 | = 6 | 10 | = 20 |
7 | = 7 | 11 | = 21 |
8 | = 10 | 12 | = 22 |
9 | = 11 | 13 | = 23 |
a | = 12 | 14 | = 24 |
octal (base 8) | hexadecimal (base 16) |
---|---|
1 | = 1 |
2 | = 2 |
3 | = 3 |
4 | = 4 |
5 | = 5 |
6 | = 6 |
7 | = 7 |
10 | = 8 |
11 | = 9 |
12 | = a |