Add a function to decode a hex string to binary.