www.cryer.co.uk
Brian Cryer's Web Resources

HEX

HEX
1. Hexadecimal. A base 16 numbering system, which uses the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. So:
Hex Decimal Octal Binary
0 0 0 0000
1 1 1 0001
2 2 2 0010
3 3 3 0011
4 4 4 0100
5 5 5 0101
6 6 6 0110
7 7 7 0111
8 8 10 1000
9 9 11 1001
A 10 12 1010
B 11 13 1011
C 12 14 1100
D 13 15 1101
E 14 16 1110
F 15 17 1111
10 16 20 10000

Hexadecimal is used in IT because of its close relationship to Binary - as can be seen from the above table each hexadecimal digit corresponds to 4 bits. This means that the hexadecimal numbers 0 to FF cover all the possible eight bit values of a byte (0 to 255 decimal).

Depending on the context, hexidecimal numbers are sometimes prefixed with 0x or # to indicate that the number is hexadecimal and not decimal.

2. Hexagonal. A flat six sided shape.