Python program to convert binary number to decimal.

In this page, you will learn about how to convert binary number which is in the form of 0 & 1  to the decimal number.

Code to convert number from binary to decimal

bin_num = "101010"
decimal_num = int(bin_num, 2)
print("Decimal equivalent:", decimal_num)

In this way , the binary number is converted to decimal number.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top