def convert_in_bit_format(ip_value) -> str:
    """
    This function will receive a value in parameter an
    convert it in a bit format.

    :param ip_value: Can be a mask or an IP address
    :return str: ip_value in bit format
    """

    all_bytes = ip_value.split(".")

    assert all_bytes.__len__() == 4

    bit_format = ""
    for bytes in all_bytes:
        # [2:] for remove "0b"
        bit_format = bit_format + str(bin(int(bytes))[2:].zfill(8))

    return bit_format