Python3 Solution using `carry` sum to convert from normal base-2 binary representation
We start with a normal base-2 binary representation and try to convert it to a negative-2-base bit string.\n- For every bit at the odd index (starting from righ
- We start with a normal base-2 binary representation and try to convert it to a negative-2-base bit string.\n- For every bit at the odd index (starting from right, 0-indexed), if it\'s `1`, we force the carry to be `1`.\n- This is because bit at odd index represent negative value, and we need to add `1` to the left neighbor digit to **add back double of this negative value** so that the result will be the same as using a positive base.\n\n- For exmaple, 6 is `110` in `2`-base, we process the bits from right to left. When we see the first `1` on index 1, we set carry to be `1` for the next left bit `1`, which results in `1010`.\n- because now the leftmost `1` is also on odd index (index: 3), we also set carry to be `1` for the next left bit (`0` in this case), and eventually we got `11010`, because now the leftmost `1` is on index `4`, which is even, we stop the process.\n- 6 = 16 - 8 - 2\n\n```py\n    def baseNeg2(self, N: int) -> str:\n        res = []\n        carry = 0\n        for i, b in enumerate(reversed(f\'{N:b}\')):\n            carry, b = divmod(carry+int(b), 2)\n            res.append(b)\n            if i % 2 == 1 and b == 1:\n                carry = 1\n        if carry:\n            res.append(1)\n            if len(base2) % 2 == 1:\n                res.append(1)\n        return \'\'.join(reversed(list(map(str, res))))\n```
[]