|
The
hexadecimal number system
is a positionally-weighted numerical system whose base is 16.
The hexadecimal or base-16 system employs 15 digits to represent
numbers - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.
Note that the digits A,
B, C, D, E, and F are equal to 10, 11, 12, 13, 14, and 15 in the
decimal system.
The
decimal system equivalent of any hexadecimal number may be obtained
by polynomial expansion, which is done by multiplying each digit by
its corresponding weight in the hexadecimal system. The weight
of a digit in a hexadecimal number is equal to 16 raised to the n-1,
where n is its position in the number (from right to left), i.e.,
weight = 16n-1.
Table
1. Weights of the Digits of an 8-bit Hexadecimal Number
|
Position (from right to left) |
Weight |
|
first
|
1 |
|
2nd
|
16 |
|
3rd
|
256 |
|
4th
|
4096 |
|
5th
|
65536 |
|
6th
|
1048576 |
|
7th
|
16777216 |
|
8th
|
268435456 |
As an
example, the hexadecimal number F2B3 is equal to 3x1 + 11x16 + 2x256
+ 15x4096 = 62131 in the decimal system. In this example, B
and F were replaced by 11 and 15
(which are their decimal equivalents),
respectively, before they were multiplied to the weights
corresponding to their position in the number.
See Also:
Binary System;
Math Used
in ECE
|