def get_number_base(bitstring, base):
    """Transfer bitstring to a number in base `base`."""
    nr = 0
    for place, bit in enumerate(bitstring[::-1]):
        nr += base**place * int(bit)
    return nr