A random bit manipulation question

Find the XOR of two numbers and print it.

Hint : Input the numbers as strings.

Input Format

First line contains first number X and second line contains second number Y.
The numbers will be given to you in binary form.

Constraints

0 <= X <= 2^1000
0 <= Y <= 2^1000

Output Format

Output one number in binary format, the XOR of two numbers.

Sample Input 0

11011
10101
Sample Output 0

01110

Hello @dare_devil_007,

  1. Start iterating both the strings from right to left bit by bit.
  2. Perform the XOR for both the bits and store the result.
  3. In the case when both strings are not of the same length, after iterating the smaller string completely append the remaining bits of the larger string as it is.
  4. Print the result after reversing the order of all the results obtained.

If the input contains the strings of the same length for all the test cases.

  1. iterate the strings from left to right bit by bit.
  2. Perform the XOR for both the bits and print the output.

Hope, this would help.
Give a like if you are satisfied.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.