Negative Base — Definition, Formula & Example
A negative base is a place-value system whose base is a negative integer such as −2 or −10. Because the place values alternate in sign, you can write every integer, positive or negative, using only nonnegative digits and no minus sign.
Fix an integer . A base numeral with digits denotes the integer . Every integer has exactly one such representation without leading zeros. Base −2 is called negabinary, and base −10 is called negadecimal.
Key Formula
Where:
- = The integer being represented. It may be positive, negative, or zero.
- = The negative base, where b is an integer with b ≥ 2.
- = The digit in position k. It is always a nonnegative integer less than b.
- = The position index, counting from 0 at the rightmost digit.
- = The position of the leftmost (highest) digit.
Worked Example
Problem: Write the integer −5 in base −2 (negabinary). Then check your answer.
Step 1: Divide by −2 repeatedly. Each remainder must be 0 or 1. Start with −5. The quotient 3 works because it leaves a remainder of 1. Then divide 3 by −2, which gives quotient −1 and remainder 1.
Step 2: Keep dividing until the quotient reaches 0.
Step 3: Read the remainders from last to first, which gives 1111. To check, multiply each digit by its place value: 1, −2, 4, and −8 from right to left.
Answer: . The digits are all 1s, and the number carries no minus sign.
Why It Matters
Negative bases appear in discrete math and computer architecture courses. They show that a number's sign can come from the place values themselves instead of from a separate sign bit or a two's-complement rule. Donald Knuth discusses them in The Art of Computer Programming, Volume 2, and the Polish UMC-1 computers of the late 1950s did their arithmetic in negabinary.
Common Mistakes
Mistake: Accepting a negative remainder during division. For example, students write −5 ÷ (−2) = 2 with remainder −1.
Correction: A digit can never be negative. If the remainder comes out negative, add 1 to the quotient and add b to the remainder. Here 2 R −1 becomes 3 R 1, because (−2)(3) + 1 = −5.
