Binary Calculator Nov 17, 2022 • Amay Advani • 1 min read num = list(input("Input a binary number: ")) x = 0 for i in range(len(num)): digit = num.pop() if digit == '1': x = x + pow(2, i) print("The decimal value of the number is", x) The decimal value of the number is 4