#K70192. Binary Addition
Binary Addition
Binary Addition
You are given two binary strings representing non-negative integers. Your task is to compute their sum and output the result as a binary string.
In mathematical notation, if \( A = binary1_{(2)} \) and \( B = binary2_{(2)} \), you are to compute \( C = A + B \) and output \( C_{(2)} \). For example, if the inputs are 1101
and 1011
, then \( 1101_{(2)} = 13 \) and \( 1011_{(2)} = 11 \), so the answer is \( 11000 \) (which is 24 in decimal).
inputFormat
The input consists of a single line containing two binary strings separated by a space.
For example: 1101 1011
outputFormat
Output the binary sum of the two input binary numbers as a binary string.
For the input 1101 1011
, the expected output is 11000
.
1101 1011
11000