Morgan Stanley Interview Question

3)Design algorithm to convert hexadecimal numbers to decimal number