Convert Binary String to Decimal Number using Python

int function

binaryString = '10100'
decimalNumber = int(binaryString, 2)

print(decimalNumber)

Leave a Comment

Cancel reply

Your email address will not be published.