```
class Solution {
public:
int i = 0x1;
int xor_val = 0;
int and_val = 0;
int getSum(int a, int b) {
xor_val = a ^ b;
and_val = a & b;
a = xor_val;
b = and_val << 1;
if (b == 0)
return a;
else
return getSum(a,b);
}
};
```