convert hex string to decimal int.