Number System Converter
Converts automatically as you type.
About Negabinary (Base β2)
Negabinary is a positional numeral system with base β2 and digits 0 and 1. It represents every integer β positive, negative, and zero β without a minus sign, because its places alternate between positive and negative powers of two: β¦ β8, +4, β2, +1.
Quick sign check: a numeral with an odd number of digits is positive (its leading 1 sits on a positive power), and one with an even number of digits is negative. 110 = +2, but 11 = β1.
This tool computes with exact integer arithmetic (BigInt), so even very long numerals convert without rounding errors. Inputs accept up to 64 negabinary digits or 18-digit decimals.
Negabinary Calculator
Keyboard: 0 1 digits Β· + β Γ / operators Β· Enter equals Β· Backspace delete Β· Esc clear Β· N negate
How It Works
Enter numbers as negabinary bit strings. The live line under the display shows the exact decimal value at every step, and the small line above it shows the pending operation. Internally the calculator converts to decimal, computes with exact integer arithmetic, and converts back.
Division gives the integer quotient (truncated toward zero); the decimal line reports any remainder. A neat base β2 trick: appending a 0 multiplies a number by β2.
Negabinary Utilities
Number Range Calculator
Find the exact range of integers representable with a given number of negabinary bits.
Bitwise Operations
Apply AND, OR, or XOR to two negabinary bit patterns (aligned at the units place). Note: these act on the digit patterns β the decimal results don't follow ordinary two's-complement bitwise rules.
Parity Checker
Determine instantly whether a negabinary number is even or odd β only the last digit matters, because every other place value is even.
Negabinary Reference
Place Values: powers of β2
| Position | (β2)βΏ | Value |
|---|
Quick Rules
Sign at a glance: odd digit count β positive, even digit count β negative (only 0 is neither).
Parity: the last digit is the parity β β¦1 is odd, β¦0 is even.
Multiply by β2: append a 0.
Negation is not bit-flipping: β(1) is 11, not 0. Changing sign requires real arithmetic.
Uniqueness: every integer has exactly one negabinary representation (without leading zeros).
Value Chart: β16 to +16
Note how positives and negatives interleave without any sign symbol. The teal rows are positive, orange negative.
| Decimal | Negabinary | Digits | Decimal | Negabinary | Digits |
|---|
Learn: Why Base β2?
A signless number system
Negative bases were first described by Vittorio GrΓΌnwald in 1885, and base β2 later moved from curiosity to hardware: Polish computers of the late 1950s and early 1960s β the UMC series designed around ZdzisΕaw Pawlak's "minus-two" arithmetic β actually computed in negabinary.
The appeal: with base β2 there is no sign bit, no two's complement, and no separate rules for negative numbers. Every integer is just a string of 0s and 1s, and the same addition circuitry handles positives and negatives alike. The trade-off is that comparisons and sign tests become less direct β which is why base 2 plus two's complement won out in mainstream hardware.
How the range grows: a lopsided ladder
Each extra bit doubles how many integers fit (so each bar below is drawn one step longer, on a doubling scale), but the new territory alternates sides: an even-positioned bit extends the positive reach, an odd-positioned bit the negative. The split keeps flip-flopping between roughly β / β .
Example: 8 bits cover β170 β¦ +85, while 9 bits cover β170 β¦ +341 β the ninth bit adds only positive numbers.
Converting by hand
1. Divide the number by β2 and truncate toward zero. If the remainder is negative, add 2 to it and add 1 to the quotient β remainders must be 0 or 1.
2. Write down the remainder; the quotient becomes the new number.
3. Repeat until the quotient is 0. The remainders, read last-to-first, are the negabinary digits.
Example for β9: the steps produce remainders 1, 1, 0, 1 β read last-to-first: 1011. Check: 1Γ(β8) + 0Γ(+4) + 1Γ(β2) + 1Γ(+1) = β9. Try it in the Converter tab β the diverging chart walks through every place for you.