```
class Solution {
public:
int getSum(int a, int b) {
int x, y, z = 0, result = 0;
for(int i = 1; i != 0; i <<= 1)
{
x = a&1;
y = b&1;
int res = x^y^z;
z = (x&y)|(y&z)|(x&z);
result >>= 1;
if(res)
result |= INT_MIN;
else
result &= INT_MAX;
a >>= 1;
b >>= 1;
}
return result;
}
};
```