位运算做加法

public int add(int a, int b) {
        while (a != 0) {
            int temp = a ^ b;
            a = (a & b) << 1;
            b = temp;
        }
        return b;

    }
原文地址:https://www.cnblogs.com/zzq-include/p/13584973.html