Python code using mask
\ndef getSum(self, a: int, b: int) -> int:\n        if a==0:\n            return b\n        if b==0:\n            return a\n        mask = 0xffffffff\n        w
```\ndef getSum(self, a: int, b: int) -> int:\n        if a==0:\n            return b\n        if b==0:\n            return a\n        mask = 0xffffffff\n        while b!=0:\n            x,y=a,b\n            a=(a^b)&mask\n            b=((x&y)<<1)&mask\n        if (a >> 31) & 1:\n            return ~(a ^ mask)\n        else:\n            return a\n```\nIf there is a negative integer n, and its unsigned 32-bit two\'s complement is m, then m = ~(n ^ 0xffffffff) and n = ~(m ^ 0xffffffff)
[]