def pattern_to_bit_string(pattern):
    """Converts a pattern to a bit string, by using indicators for switch presence.

    Parameters
    ----------
    pattern : str
        Textual description of a pattern.

    Returns
    -------
    Tuple[int]
        The bitstring.
    """
    
    bits = []
    for line in pattern.splitlines():
        if line.startswith('~'):
            bits.append(0)
        else:
            bits.append(1)

    return tuple(bits)