#C10246. Bitwise AND of Two Binary Strings
Bitwise AND of Two Binary Strings
Bitwise AND of Two Binary Strings
This problem requires you to perform a bitwise AND operation on two binary strings of equal length. The bitwise AND operation compares each corresponding bit of the two strings and outputs 1 if both bits are 1, and 0 otherwise. For example, if the two strings are 1101
and 1010
, the result will be 1000
.
You are required to read the input from standard input (stdin) and output the result to standard output (stdout). Make sure your solution handles every bit properly and that both strings have the same length.
inputFormat
The input consists of two lines. The first line contains the binary string A and the second line contains the binary string B. Both strings are guaranteed to have the same length.
outputFormat
Output a single line containing the binary string which is the result of the bitwise AND operation performed on the two input strings.
## sample1101
1010
1000
</p>