def convert_to_decimal(string):
    """Implementation of the double-dabble algorithm for converting
    a binary bit string to a decimal integer.
    (Null and Lobur, Computer Organization and Architecture 1e, p. 46)

    Outline:
    For every digit of the binary number (_except_ the last digit),
    we add the digit (0 or 1) to the sum and then multiply the sum by two.
    For the last digit, we skip the multiplication step.
    Assume every bit of string is valid (i.e. string is entirely
    composed of 0 and 1).
    """
    sum_ = 0
    for char in string[:-1]:
        sum_ += int(char)
        sum_ <<= 1
    else:
        sum_ += int(string[-1])

    return sum_