def convert_to_txt(bits, encoding='utf-8', errors='surrogatepass'):
    """This function converts the decrypted messages from bits to bytes."""
    try:
        n = int(bits, 2)
        enc = n.to_bytes((n.bit_length() + 7) // 8, 'big').decode(encoding, errors) or '\0'
        return True, enc
    except Exception as e:
        return False, e