C#
\npublic string BaseNeg2(int N) {\n\tvar sb = new StringBuilder();\n\twhile (N != 0) {\n\t\tsb.Append(N & 1);\n\t\tN = -(N >> 1);\n\t}\n\treturn sb.Length > 0\n
```\npublic string BaseNeg2(int N) {\n\tvar sb = new StringBuilder();\n\twhile (N != 0) {\n\t\tsb.Append(N & 1);\n\t\tN = -(N >> 1);\n\t}\n\treturn sb.Length > 0\n\t\t? new string(sb.ToString().Reverse().ToArray())\n\t\t: "0";\n}\n```
[]