int getSum(int a, int b) {

```
if(((a^b)&((a&b)<<1))==0)
return (a^b)|((a&b)<<1);
//this always works unless the addition (read OR) of the two halves involves yet another carry, //hence the next step of recursion
else return(getSum((a^b),((a&b)<<1)));
```

}