#K39787. Binary String XOR Operation

    ID: 26498 Type: Default 1000ms 256MiB

Binary String XOR Operation

Binary String XOR Operation

Given two binary strings of equal length, you are required to compute their bitwise XOR. For each bit position (i) where (0 \le i < n) (with (n) being the string length), the resulting bit is defined as follows:

[ \text{result}_i = a_i \oplus b_i ]

That is, the bit at position (i) in the output is '1' if exactly one of (a_i) or (b_i) is '1', and '0' if both bits are the same. The input will consist of two lines, each containing a binary string, and the output should be the computed binary string according to the operation above.

inputFormat

Input is read from standard input (stdin) and consists of two lines. The first line contains the binary string (a) and the second line contains the binary string (b). Both strings are of equal length.

outputFormat

Output to standard output (stdout) a single line containing the result of the bitwise XOR of the two input binary strings.## sample

1101
1011
0110