Java, simple 3 lines
\n    public String baseNeg2(int N) {\n        StringBuilder ans = new StringBuilder( N==0 ? "0" : "" );\n        for( ; N!=0; N=-(N>>1) ) ans.append( (N&1)==0 
```\n    public String baseNeg2(int N) {\n        StringBuilder ans = new StringBuilder( N==0 ? "0" : "" );\n        for( ; N!=0; N=-(N>>1) ) ans.append( (N&1)==0 ? \'0\' : \'1\' );\n        return ans.reverse().toString();\n    }\n```
[]