Given an binary string as input, we need to write a program to convert the binary string into equivalent integer. To convert an binary string to integer, we have to use Convert.ToInt32(String, Base/Int32) function to convert the values. The base of the binary is 2.
Input : 1010101010101010 Output : 43690 Input : 1100011000 111100001111 11001100110011001100 Output : 792 3855 838860
Number value of binary "1010101010101010" is = 43690
Number value of binary "1100011000" is = 792 Number value of binary "111100001111" is = 3855 Number value of binary "11001100110011001100" is = 838860
- C# Program to Convert the Octal String to an Integer Number
- C# Program for Converting Hexadecimal String to Integer
- C# Program for Count set bits in an integer
- Convert String to Character Array in C#
- C# Program to Count number of binary strings without consecutive 1's
- C# Program to print all permutations of a given string
- How to Convert ASCII Char to Byte in C#?
- C# Program for Naive algorithm for Pattern Searching
- C# Program for KMP Algorithm for Pattern Searching
- C# Program for Count Inversions in an array | Set 1 (Using Merge Sort)
- C# Program for Median of two sorted arrays of same size
- C# Program for Activity Selection Problem | Greedy Algo-1
- C# Program for Subset Sum Problem | DP-25
- C# Program for Dijkstra's shortest path algorithm | Greedy Algo-7
- C# Program for Maximum sum rectangle in a 2D matrix | DP-27
- C# Program for Largest Sum Contiguous Subarray
- C# Program for Maximum size square sub-matrix with all 1s
- C# Program for Minimum number of jumps to reach end
- C# Program for Cutting a Rod | DP-13
- C# Program for Longest Palindromic Subsequence | DP-12
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.