Does anyone know how to add 2 binary numbers, entered as binary, in Java?
For example, 1010 + 10 = 1100.
1010 + 10 = 1100
Another interesting but long approach is to convert each of the two numbers to decimal, adding the decimal numbers and converting the answer obtained back to binary!