Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

binary addition c#

public class Solution
{
    public string AddBinary(string a, string b) 
    {
        int number_one = Convert.ToInt32(a, 2);
        int number_two = Convert.ToInt32(b, 2);

        return Convert.ToString(number_one + number_two, 2);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #binary #addition
ADD COMMENT
Topic
Name
6+8 =