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.
Converting f0a183b16
to octal:
f0a183b16 = 11110000101000011000001110112
11110000101000011000001110112 = 17024140738
Thus, f0a183b16 = 17024140738
Hex | 4-bit Binary | Hex | 4-bit Binary | 3-bit Binary | Oct | ||
---|---|---|---|---|---|---|---|
0 | 0000 | 8 | 1000 | 000 | 0 | ||
1 | 0001 | 9 | 1001 | 001 | 1 | ||
2 | 0010 | A | 1010 | 010 | 2 | ||
3 | 0011 | B | 1011 | 011 | 3 | ||
4 | 0100 | C | 1100 | 100 | 4 | ||
5 | 0101 | D | 1101 | 101 | 5 | ||
6 | 0110 | E | 1110 | 110 | 6 | ||
7 | 0111 | F | 1111 | 111 | 7 |