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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Program for Decimal to Binary Conversion
- Program for Binary To Decimal Conversion
- Python program to convert decimal to binary number
- BCD or Binary Coded Decimal
- Floor value Kth root of a number using Recursive Binary Search
- Decimal to binary number using recursion
- Decimal representation of given binary string is divisible by 5 or not
- Counting even decimal value substrings in a binary string
- Decimal representation of given binary string is divisible by 20 or not
- Decimal to binary conversion without using arithmetic operators
- Binary to decimal and vice-versa in python
- Number of substrings with odd decimal value in a binary string
- Decimal to Binary using recursion and without using power operator
- Decimal representation of given binary string is divisible by 10 or not
- Queries for decimal values of subarrays of a binary array
- Recursive program to find the Sum of the series 1 - 1/2 + 1/3 - 1/4 ... 1/N
- Recursive program for prime number
- Recursive program to generate power set
- C++ Program for Recursive Bubble Sort
- Recursive program to print all subsets with given sum
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.