int getSum(int a, int b) { int sum=0, carry=0; long ln=0; sum = a^b; carry = (a&b)<<1; while(carry != 0){ a = sum; b = carry; sum = a^b; carry = (a&b)<<1; } ln = ln|sum; return ln; }