Convert from Hexadecimal to Decimal
To convert a number from hexadecimal to decimal, each digit has to be multiplied by the base a power of the place of the digit starting from right. The decimal number is the sum of these factors.
Example: 0x4d => decimal
4 * 16^1 + D * 16^0 =
4 * 16 + 13 * 1 =
64 + 13 =
77 (= 0x4d)