One line JAVA code
a^b is the sum of a and b bitwise without carrier, (a&b)<<1 is the carrier computation bitwise, when the carrier is equal to 0, the recursion terminate, the cod
a^b is the sum of a and b bitwise without carrier, (a&b)<<1 is the carrier computation bitwise, when the carrier is equal to 0, the recursion terminate, the code is much like Euclidean gcd:\n\n    public int getSum(int a, int b) {\n        return b == 0 ? a : getSum(a ^ b, (a & b) << 1);\n    }
[]