def bin_to_dec(binary_number):
    """
    Accepts an integer binary number in a string.
    Returns a decimal number.
    """
    bits_list = []
    for bit in binary_number:
        bits_list.append(int(bit))
    decimal_number = 0
    for bit_position, bit in enumerate(reversed(bits_list)):
        decimal_number += bit * 2 ** bit_position
    return decimal_number
