Binary to Negabinary Converter
Convert standard binary (base 2) numbers to negabinary (base -2) representation. Supports multiple numbers, one per line.
Negabinary (base -2) represents both positive and negative integers using only 0s and 1s, with place values flipping sign every position. Paste standard binary numbers on the left, one per line, and the base -2 conversion appears on the right with optional decimal and place-value breakdowns. And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter binary numbers in the left panel, one per line. You can type, paste, or click Sample for examples.
Toggle options to show the decimal intermediate value or the place values breakdown for each conversion.
Click Convert or leave Live mode enabled for real-time conversion as you type.
Copy, Download, or Swap the result. Swap converts negabinary values back to standard binary.
Frequently Asked Questions
What is negabinary (base -2)?
Negabinary is a numeral system that uses -2 as its base instead of the usual 2. Like standard binary, it only uses the digits 0 and 1, but the place values alternate in sign: from right to left they are 1, -2, 4, -8, 16, -32, 64, and so on. This means negabinary can represent both positive and negative integers without needing a separate sign bit, which is a unique property compared to standard binary representations.
How do you convert a decimal number to negabinary?
To convert a decimal number to negabinary, repeatedly divide by -2. At each step, if the remainder is negative, add 2 to the remainder and add 1 to the quotient to keep the remainder in the set {0, 1}. Collect the remainders from last to first to form the negabinary number. For example, 6 in decimal becomes 11010 in negabinary: 1(16) + 1(-8) + 0(4) + 1(-2) + 0(1) = 16 - 8 + 0 - 2 + 0 = 6.
Can negabinary represent negative numbers without a sign?
Yes, that is one of the key advantages of negabinary. Because every other place value is negative, the system can naturally represent both positive and negative integers using only the digits 0 and 1. For example, -3 in decimal is 1101 in negabinary: 1(-8) + 1(4) + 0(-2) + 1(1) = -8 + 4 + 0 + 1 = -3. No separate sign bit or two's complement notation is needed.
What are practical uses of negabinary?
Negabinary has been studied in computer science and digital circuit design because it eliminates the need for a separate sign representation. It was used in early Polish computers (such as the BINEG machine). It is also of theoretical interest in mathematics and coding theory, and appears in programming contests and algorithm challenges. The system simplifies certain arithmetic operations since addition and subtraction follow similar rules.
Is every integer representable in negabinary?
Yes. Every integer, whether positive, negative, or zero, has a unique finite negabinary representation. Zero is represented as 0, and every nonzero integer can be expressed as a finite string of 0s and 1s when interpreted in base -2. This completeness is mathematically proven and makes negabinary a fully functional positional numeral system.