def char_to_bin(char: str) -> str:
    """This creates a string representing the binary value of the character.

    Parameters:
    -----------
    char:
        string: A single character.

    Returns:
    --------
    binary:
        string: The 8-bit binary representation of the character.
    """

    binary = bin(ord(char))[2::]
    while len(binary) < 8:
        binary = "{}{}".format(0, binary)

    return binary