Converts hexadecimal numbers to decimal