How to Convert from Hexadecimal to Decimal?
To confirm that our decimal-to-hexadecimal conversion was correct, we’ll now take the hexadecimal number we obtained earlier and convert it back to decimal using the steps we just outlined.
Example: Let’s convert \(\mathsf{65.19D_{16}}\) into base-10.
To begin the conversion, we separate the hexadecimal number into its whole and fractional parts. The digits before the hexadecimal point form the whole number part, while those after it make up the fractional part. Hence \(\mathsf{65_{16}}\) represents the whole number part, and \(\mathsf{19D_{16}}\) is the fractional part.
The whole number conversion simply involves assigning index values to each digit, multiplying each digit by \(\mathsf{16}\) raised to its index, and then summing all the resulting products.
This gives us \(\mathsf{101_{10}}\), the decimal equivalent of \(\mathsf{65_{16}}\).
For the fractional part, the method is the same, except the indexing starts from the left with the first digit assigned an index of \(\mathsf{-1}\), decreasing further to the right.
The decimal equivalent of the fractional part, computed through this method, is \(\mathsf{0.1008_{10}}\).
After separately converting both the whole and fractional components using their respective methods, we combine the results to form the complete decimal representation. Thus, the decimal number \(\mathsf{65.19D_{16}}\) is equivalently expressed in decimal as \(\mathsf{101.1008_{10}}\).
Did we Get it Right?
Now, if you recall, we originally obtained this hexadecimal number by converting \(\mathsf{101.101}\) from decimal. When we reversed the process, the result was very close—almost perfect—but not exactly the same. Interestingly, both the decimal and hexadecimal versions had three digits of precision in the fractional part. However, since hexadecimal uses sixteen distinct symbols (\(\mathsf{0}\) through \(\mathsf{F}\)), it can often represent values more compactly than decimal. That said, we’ll leave it to the reader to explore why the result wasn’t an exact match.
Hint: Each digit in hexadecimal contributes a value based on \(\mathsf{16^{\textsf{index}}}\), which means even a few digits can represent large or very precise values. But this also means that matching a decimal number exactly may not be possible with the same number of fractional digits—especially if the decimal value doesn’t align neatly with powers of \(\mathsf{16}\).