@@ -0,0 +1,642 @@
+/**%0A * Created by jinglongyang on 10/12/14.%0A */%0Apublic class AddBinary %7B%0A    public String addBinary(String a, String b) %7B%0A        int carry = 0;%0A        int la = a.length(), lb = b.length();%0A        int i = la - 1, j = lb - 1;%0A        StringBuilder res = new StringBuilder();%0A        while (i %3E= 0 %7C%7C j %3E= 0 %7C%7C carry %3E 0) %7B%0A            int a1 = i %3E= 0 ? (a.charAt(i) - '0') : 0;%0A            int b1 = j %3E= 0 ? (b.charAt(j) - '0') : 0;%0A            int tmp = a1 + b1 + carry;%0A            res.append(tmp %25 2);%0A            carry = tmp / 2;%0A            i--;%0A            j--;%0A        %7D%0A        res.reverse();%0A        return res.toString();%0A    %7D%0A%7D%0A

add binary