Is there negative base representation of numbers?

$\begingroup$

Every real number can be expressed as its base 10 representation, as $$\sum_{i=-\infty}^\infty a_i 10^i\,$$ where $a_i\in\{0,1,\dots,9\}$. We also have base 2 or base 8.

Question: Is there a base -2 representation, in which we replace the 10 in the above equation with -2? Also base -3, -8, -11, etc

$\endgroup$ 6

1 Answer

$\begingroup$

Consider base $-2$, so that the places in increasing size go $1,-2,4,-8\dots$ 1 is just 1, but for 2 we have to subtract 2 from 4: $$2_{10}=110_{-2}$$ Representations of other numbers follow this same trick. The main advantage of this system is that it doesn't need a minus sign for negative numbers: $$-1_{10}=10_{-2}\qquad-5_{10}=1111_{-2}$$ The main disadvantage is that positive numbers may need one more bit to represent than they would in natural binary. By going past the radix point, we can represent all real numbers too.

This, then, is negabinary or base $-2$. We can similarly define "negative" versions of all positive positional bases, where base $-n$ uses the same digits as base $n$ but multiplies each place by $-n$; they all have similar properties to the negabinary system discussed above.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like