Convert hex number to integers.