Robert Bosch interview question

conver a number from hexadecimal to decimal without using predefined functions