Return the binary string.There is a perfect mapping between all possible numbers 1 to 255 in the ASCII table and the calculated values for all possible eight character binary numbers. Append the binary representation to the binary string. Convert each hexadecimal digit to its binary representation using a dictionary. Loop over the hexadecimal digits from the second character to the end. Initialize an empty string to store the binary representation.
Approach: Convert the hexadecimal number to a string.