------
## 最终结论
```python
def binary_to_decimal(binary):
    decimal_value = 0
    binary_str = str(binary)[::-1]  # Reverse the string to process from right to left
    
    for index, digit in enumerate(binary_str):
        decimal_value += int(digit) * (2 ** index)
    
    return decimal_value

# Test cases
assert binary_to_decimal(100) == 4
assert binary_to_decimal(1011) == 11
assert binary_to_decimal(1101101) == 109
```