Menu
Question Index
...

Write a program to find the sum of given binary strings. The output returned should also be in binary format.

Input (String, String) Output (String)
110110, 100001 1010111
111111, 101010 1101001
100000, 11111 111111
1011101, 1001 1100110
1011101, "" " " (Empty)
1011010, 111 1100001



class FindSumOfBinaryStrings
{
    public static void main(String s[])
    {
        String string_one = "1000", string_two = "1010";
        System.out.println("Sum of given binary strings is " + getBinarySum(string_one, string_two));

    }


    public static String getBinarySum(String one, String two) {

}

Doubts

Problems

Topic: Creating Objects for Primitive Data Types (Byte, Short)

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App