Binary to Negabinary

Convert numbers between standard decimal or binary and base -2 (negabinary). Features negative number representation without a minus sign, arbitrary precision BigInt math, and worked steps.

Private • In-browser processing • Zero server uploads

Interactive workspace loading...

How to Use Binary to Negabinary

1
Enter Number or Bits
Type or paste an integer (e.g. 6, -3, -42) or a negabinary bit string (e.g. 11010).
2
Choose Direction
Leave on Auto Detect or explicitly select Decimal to Negabinary or Negabinary to Decimal.
3
Inspect Result & Steps
Toggle Worked Steps to view the complete mathematical proof and division operations.

Key Features

Base -2 Conversion
Represent both positive and negative integers in base -2 without needing a sign symbol (+ or -).
Arbitrary Precision
Powered by native JavaScript BigInt, supporting integers of unlimited size.
Bidirectional Conversion
Convert from decimal or base-2 binary to negabinary, and decode negabinary back to decimal.
Worked Derivation Steps
View step-by-step mathematical division and polynomial expansions for learning and verification.

Common Use Cases

  • Computer science education and studying non-standard positional numeral systems.
  • Hardware and arithmetic logic design where negative numbers must be represented without dedicated sign bits.
  • Exploring algorithmic arithmetic and base-radix representations.
  • Cryptographic and mathematical research involving negative radix number bases.

Frequently Asked Questions

Negabinary is a positional numeral system with base -2. Unlike standard binary (base 2), digits alternate in sign power: (-2)^0 = +1, (-2)^1 = -2, (-2)^2 = +4, (-2)^3 = -8, and so forth. Any integer, whether positive or negative, can be expressed uniquely using only digits 0 and 1 without any minus sign.

Evaluating from right to left: 0*(-2)^0 + 1*(-2)^1 + 0*(-2)^2 + 1*(-2)^3 + 1*(-2)^4 = 0 - 2 + 0 - 8 + 16 = 6.

Yes! For example, -1 is 11 in negabinary (1*(-2)^1 + 1*(-2)^0 = -2 + 1 = -1), and -3 is 1101 (-8 + 4 + 1 = -3). No sign bit is needed.