Does anyone know how to add 2 binary numbers, entered as binary, in Java?
For example, 1010 + 10 = 1100.
1010 + 10 = 1100
Martijn is absolutely correct, to piggyback and complete the answer
Integer.toBinaryString(sum);
would give your output in binary as per the OP question.