# OT: Number bases (WAS: Constructed Computer Architectures (Concomps?))

From: | Gary Shannon <fiziwig@...> |

Date: | Tuesday, February 10, 2009, 1:00 |

--- On Mon, 2/9/09, Michael Potter <mhpotter@...> wrote:
>
> A few months ago, I started designing a computer that used
> balanced ternary logic (which uses -1 as the third logical
> value, instead of 2). I did this as a thought experiment,
> but I have actually written a simulator that (mostly) works.

How about using a NEGATIVE base?
Since odd powers of a negative base will be negative and even powers will be
positive the place values of the digits will alternate positive and negative.
Take, for example, numbers to base -2. The place values will be -2^0, -2^1,
-2^2, -2^3, ... = +1, -2, +4, -8, +16, -32, ...
Therefore base ten integers would be expressed to the base -2 as follows:
...
-10 = 1010
- 9 = 1011
- 8 = 1000
- 7 = 1001
- 6 = 1110 (= -8 +4 -2)
- 5 = 1111
- 4 = 1100
- 3 = 1101
- 2 = 10
- 1 = 11
+ 0 = 0
+ 1 = 1
+ 2 = 110 (= +4 -2)
+ 3 = 111
+ 4 = 100
+ 5 = 101
+ 6 = 11010 (= +16 -8 -2)
+ 7 = 11011 (= +16 -8 -2 +1)
+ 8 = 11000
+ 9 = 11001
+10 = 11110 (= +16 -8 +4 -2)
...
+268 = 100011100 (+256 +16 -8 +4)
One obvious advantage is that negative numbers do not need an additional sign bit
to show that they are negative. One obvious disadvantage is that simple bit
shift operations also negate the result so that shift left, for example,
results in doubling the value AND reversing the sign. These properties would
complicate even the most basic arithmetic circuits.
--gary

### Reply