This system has 16 digits. These are 0, 1, …, 9, A, B, C, D, E, F. Since a digit must occupy a single position, the letters A, B, C, D, E, F are used to represent the values 10, 11, 12, 13, 14, 15, respectively. The decimal value of a hexadecimal number is computed by summing the result of multiplying each of its digits by the base 16 raised to a power determined by the digit position.
The hexadecimal numbering system was advised so as to represent long strings of bits in a more compressed format. Since the hexadecimal base 16 is equal to the binary base 2 raised to the power of 4 (16 = 24), a binary number is converted to a hexadecimal number by replacing each 4 consecutive bits by the equivalent hexadecimal digit starting from right to left. Similarly, a hexadecimal number is converted to a binary number by replacing each hexadecimal digit by its 4-bit binary equivalent. |