Given a binary number as string, find its decimal equivalent.
Input : binary = "101" Output : 5 Input : binary = "1111" Output : 15
We have discussed iterative solution to convert Binary to Decimal.
The idea is simple, we add current term and recur for remaining terms.
- Program for Binary To Decimal Conversion
- Program for Decimal to Binary Conversion
- Python program to covert decimal to binary number
- Decimal to binary number using recursion
- Number of substrings with odd decimal value in a binary string
- Binary to decimal and vice-versa in python
- Decimal representation of given binary string is divisible by 10 or not
- Counting even decimal value substrings in a binary string
- Decimal to binary conversion without using arithmetic operators
- Decimal representation of given binary string is divisible by 5 or not
- Decimal representation of given binary string is divisible by 20 or not
- Queries for decimal values of subarrays of a binary array
- Program for hexadecimal to decimal
- Program for octal to decimal conversion
- Program for decimal to octal conversion
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.