hexadecimal number
A style of expressing numeric values similar to decimal notation except for being based on 16 rather than 10, the graphic characters for which are now usually written
0 1 2 3 4 5 6 7 8 9 A B C D E FFor example, the number 301 in the decimal system, being
| = 1 × 256 | + 2 × 16 | + 13 × 1 |
| = 1 × 162 | + 2 × 161 | + 13 × 160 |
is written in hexadecimal as 12D, the D standing for the 13. (All 16 graphic characters, including the six letters, are called ‘digits’ within this context.) Hexadecimal has the advantage with computers that 16 is a power of 2, and the lowest such power that can accommodate all 10 decimal digits. (Compare
octal.) Since 16 = 2
4, each hexadecimal digit equates with 4 bits, so fits conveniently precisely two digits to the now ubiquitous 8-bit byte. Some computers use hexadecimal as the base for
floating-point numbers, i.e. the binary number has its fractional point moved in steps of 4 bits, the exponent applicable to 16 rather than 10. Hexadecimal notation is of particular convenience for the human study of binary data, providing a compact form for expressing binary numbers that is segmented, unlike
octal, consistently with the machine bytes.