Created function to convert a hex string to a bit string