Theiling Online    Sitemap    Conlang Mailing List HQ    Attic   

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

From:Mark J. Reed <markjreed@...>
Date:Tuesday, February 10, 2009, 1:26
Balanced ternary and base -2 have both been proposed seriously in
academic circles, because they avoid the arbitrariness of modern sign
representation schemes (though 2's complement is unarguably elegant).
Of course, this argument is similar to that of auxlang proponents, and
since the simplicity gains come at the expense of complexity increases
elsewhere, it's not a clear win even in a vacuum. And at this point
the massive investment in binary logic makes any such fundamental
switchover a phenomenally expensive proposition...

On 2/9/09, Gary Shannon <fiziwig@...> wrote:
> --- 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 >
-- Sent from my mobile device Mark J. Reed <markjreed@...>

Replies

Ph.D. <phil@...>
Henrik Theiling <theiling@...>Number bases