Hex to decimal conversion