Morgan Stanley interview question

3)Design algorithm to convert hexadecimal numbers to decimal number