Negabinary numbers are written in base -2. For example, the negabinary number 11010 is (-2)^4+(-2)^3+(-2)^1 = 16 - 8 – 2, or 6 in base 10. In a similar way, -3 in base 10 is 1101 in negabinary.
Write a function that converts an integer to negabinary, written as a character string.

Solution Stats

9 Solutions

6 Solvers

Last Solution submitted on Apr 23, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...