def bitstring_to_number(bitstring):
    """
    Convert a bitstring to a number.

    E.g. ``10110101`` gives 181.

    Args:
        bitstring (str): String of ``1``\ s and ``0``\ s.
    Returns:
        int: The equivalent integer.

    """
    return int(bitstring, 2)