convert a hexadecimal number into an (unsigned) int