n
digits:
dec = (Dn-1×16n-1) + (Dn-2×16n-2) + … +(D1×161) + (D0×160)Each digit
Dj
is multiplied by 16j
. For example, the decimal equivalent of the hexadecimal number (B65F)16
can be found from the multiplication of the digits by powers of 16:
16n | Decimal Value | 16n | Decimal Value | 16n | Decimal Value | ||
---|---|---|---|---|---|---|---|
160 | 1 | 163 | 4096 | 166 | 16,777,216 | ||
161 | 16 | 164 | 65,536 | 167 | 268,435,456 | ||
162 | 256 | 165 | 1,048,576 | 168 | 4,294,967,296 |