Javascript solution, very long!!!
js\nconst baseNeg2 = (N) => {\n    if (N === 0) return "0";\n    let currentLeft = N, pos = 0, prev = 0, ans = "";\n    while (currentLeft > 0) {\n        const
```js\nconst baseNeg2 = (N) => {\n    if (N === 0) return "0";\n    let currentLeft = N, pos = 0, prev = 0, ans = "";\n    while (currentLeft > 0) {\n        const currentBit = currentLeft % 2;\n        const { bit, next } =  computeBit(currentBit, pos, prev);\n        ans = bit + ans;\n        prev = next;\n        ++pos;\n        currentLeft = Math.floor((currentLeft - currentBit) / 2);\n    }\n    if (prev > 0) return (pos % 2 ? \'11\' : \'1\') + ans;\n    return ans;\n};\n\nconst computeBit = (bit, pos, prev) => {\n    if (pos % 2 === 1) {\n        if (bit === 1 && prev === 1) return { bit: 0, next: 1 };\n        if (bit === 1 && prev === 0) return { bit: 1, next: 1 };\n        if (bit === 0 && prev === 1) return { bit: 1, next: 1 };\n        if (bit === 0 && prev === 0) return { bit: 0, next: 0 };\n    } else {\n        if (bit === 1 && prev === 1) return { bit: 0, next: 1 };\n        return { bit: bit + prev, next: 0 };\n    }\n}\n```
[]