[comp.lang.c] non-binary hardware

turner@sdti.UUCP (Prescott K. Turner) (09/09/88)

In article <1285@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse)
writes:
>By the way, does anyone know of a non-mechanical digital calculator or
>computer that isn't essentially binary?

A couple of years ago I attended a presentation by Prof. William Kahan 
of U.C. Berkeley.  He had an HP calculator with him which as I recall
adhered to the IEEE 854 standard for floating point using _decimal_.
An example of decimal integers would be better in some ways, but given
the stringent rounding requirements of the IEEE floating point standards,
this calculator's essence could only be called decimal.

--
Prescott K. Turner, Jr.
Software Development Technologies, Inc.
375 Dutton Rd., Sudbury, MA 01776 USA        (508) 443-5779
UUCP:genrad!mrst!sdti!turner

stevev@uoregon.uoregon.edu (Steve VanDevender) (09/10/88)

In article <297@sdti.UUCP> turner@sdti.UUCP (Prescott K. Turner, Jr.) writes:
>In article <1285@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse)
>writes:
>>By the way, does anyone know of a non-mechanical digital calculator or
>>computer that isn't essentially binary?
>
>A couple of years ago I attended a presentation by Prof. William Kahan 
>of U.C. Berkeley.  He had an HP calculator with him which as I recall
>adhered to the IEEE 854 standard for floating point using _decimal_.
>An example of decimal integers would be better in some ways, but given
>the stringent rounding requirements of the IEEE floating point standards,
>this calculator's essence could only be called decimal.
>

All HP calculators that I've ever seen use BCD floating point (ones
that I've used are the 11C and 41C, but I've played with the 15C, 34C
and 28C).  Most older HP calculators use a 7-byte BCD floating point
format with a 10 digit mantissa and 2 digit exponent, with single
digits holding the mantissa and exponent signs, and what is essentially
a bias 1000 exponent (999 represents an exponent of -1, 901 is -99, and
001-099 are positive exponents).  The 28C and 28S (and presumably the 18C
and 17S and so on) use a 12 byte mantissa and 3 byte exponent which
can range from -499 to +499.  HOWEVER, the CPUs of all these machines are
essentially binary, in that they can handle non-BCD quantities and store
data in bits--not in trinary or whatever.





-- 
Steve VanDevender	uoregon!drizzle!stevev	stevev@oregon1.BITNET
"Bipedalism--an unrecognized disease affecting over 99% of the population.
Symptoms include lack of traffic sense, slow rate of travel, and the
classic, easily recognized behavior known as walking."

lvc@cbnews.ATT.COM (Lawrence V. Cipriani) (09/10/88)

>In article <1285@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse)
>writes:
>By the way, does anyone know of a non-mechanical digital calculator or
>computer that isn't essentially binary?

I heard of a base -2 computer, that was built.  For those that don't
know how this would work here is a short table of numbers in base -2.

	4    -2     1
	-----------------
	0  +  0  +  0  = 0
	0  +  0  +  1  = 1
	0  +  1  +  0  = -2
	0  +  1  +  1  = -1
	1  +  0  +  0  = 4
	1  +  0  +  1  = 5
	1  +  1  +  0  = 2
	1  +  1  +  1  = 3

It's been so long, I forget where I read about it.  As I recall the
authors conclusion was that this technique wasn't worth the trouble.

-- 
Larry Cipriani, AT&T Network Systems, Columbus OH, cbnews!lvc lvc@cbnews.ATT.COM

roy@phri.UUCP (Roy Smith) (09/11/88)

mouse@mcgill-vision.UUCP (der Mouse) writes:
> By the way, does anyone know of a non-mechanical digital calculator or
> computer that isn't essentially binary?

	There are of course, lots of BCD and similar machines around.
Mostly older ones, but even a few new machines (mostly hand-held
calculators and the like).  But, BCD is really binary underneath in that
the actual logic signals are binary, so I don't think that really answers
der Mouse's question.

	I vaugely remember reading about a new RAM technology in which each
memory cell stored one of 4 different voltage levels.  This was converted
on-chip to two convention binary bits.  Unfortunately, I can't remember
anything about it other than a nagging suspicion that I probably read about
it in either IEEE Transactions on Computers or IEEE Spectrum somewhere in
the past year.  On the other hand, my brain could be playing tricks on me.

	The bottom line is that digital and binary are essentially
synonymous, although I suppose in theory you could define digital as
discrete and have trinary, etc. logic.  No, Tri-State (probably a tm of
somebody) doesn't count.
-- 
Roy Smith, System Administrator
Public Health Research Institute
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net
"The connector is the network"

lmiller@venera.isi.edu (Larry Miller) (09/11/88)

In article <297@sdti.UUCP> turner@sdti.UUCP (Prescott K. Turner, Jr.) writes:
>In article <1285@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse)
>writes:
>>By the way, does anyone know of a non-mechanical digital calculator or
>>computer that isn't essentially binary?
>
    There was also the IBM 1620, a BCD machine.  Yes, decimal, but
    all arithmetic was performed using table lookup, floating point
    in software, so I guess it could be called a nonbinary machine.

Larry Miller				lmiller@venera.isi.edu (no uucp)
USC/ISI					213-822-1511
4676 Admiralty Way
Marina del Rey, CA. 90292

u-dmfloy%sunset.utah.edu@utah-cs.UUCP (Daniel M Floyd) (09/11/88)

I've been toying with an idea along these lines for a while.
I've done some preliminary research and it's real sketchy.
The theme is along the trinary and up system. I don't think
digital systems like this have ever been built. Obviously
we can't count the n-ary as n goes to infinity because that's an
analog computer. A major problem with anything except binary (I'm
refering to BCD etc here too), is achieving the third, fourth, and
nth stable state. I can't count tri-state (i.e. bus circuits). The
third state with them is floating. If the bus wants high, the
float says "ok". Same if the bus wants low. For true trinary, the
circuit would complain if the bus tried any other level than what
it wanted. (I hope everyone doesn't mind the anthropomorphism.)
I've looked at several alternative trinary logic levels. No one
has given me a convincing argument about which is correct yet.

For example:

Trinary 'AND':

    0 1 2              0 1 2
=========          =========
0 | 0 0 0          0 | 0 0 0
1 | 0 1 2          1 | 0 1 2
2 | 0 2 2          2 | 0 2 1


Both have merits. I supose you could define them as AND2 and AND1.

Let's see what all of you have to say.

rob@kaa.eng.ohio-state.edu (Rob Carriere) (09/11/88)

mouse@mcgill-vision.UUCP (der Mouse) writes:
> By the way, does anyone know of a non-mechanical digital calculator or
> computer that isn't essentially binary?

Some people working on optical digital circuitry are considering using
trinary, as that seems to fit well with the physics of some of the
materials.  So who knows, maybe 50 years from now Der Katze will post
the question ``is there any computer that is not essentially
trinary?'' :-)

Rob Carriere

joe@modcomp.UUCP (09/12/88)

u-dmfloy@sunset.utah.edu.UUCP writes [edited]:

> I've been toying with an idea [on trinary and up logic].  I've done some
> preliminary research and it's real sketchy.  I've looked at several
> alternative trinary logic levels.  No one has given me a convincing
> argument about which is correct yet.
> 
> For example;  Trinary 'AND':
> 
>     0 1 2              0 1 2
> =========          =========
> 0 | 0 0 0          0 | 0 0 0
> 1 | 0 1 2          1 | 0 1 2
> 2 | 0 2 2          2 | 0 2 1
> 
> 
> Both have merits. I suppose you could define them as AND2 and AND1.
> 
> Let's see what all of you have to say.

I haven't been able to divine what your underlying theories are from just
the logic charts you presented, so I remain unconvinced that either is
valid.

My own pet theory is that n-ary logic should be based on analog logic.  By
that reasoning, AND returns the lowest of the m input values and OR
returns the highest.  Inversion should simply flip across the n-ary range.
For example, let's look at trinary:

   AND    0 1 2        OR    0 1 2    INVERSION
      =========          =========        =====
      0 | 0 0 0          0 | 0 1 2        0 | 2
      1 | 0 1 1          1 | 1 1 2        1 | 1
      2 | 0 1 2          2 | 2 2 2        2 | 0

It should be possible to build XOR gates, adders, and so on with this
logic.  However, I haven't tried it.  Any takers?  More to the point, what
have you computer scientists out in net-land, who surely have studied this
subject to death decades ago, have to say?
--
Joe Korty              "flames, flames, go away
uunet!modcomp!joe      come back again, some other day"

henry@utzoo.uucp (Henry Spencer) (09/12/88)

In article <3473@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>	I vaugely remember reading about a new RAM technology in which each
>memory cell stored one of 4 different voltage levels.  This was converted
>on-chip to two convention binary bits.  Unfortunately, I can't remember
>anything about it...

4-state *ROMs*, not *RAMs*, are already in use to a modest extent.  It's
one more way of getting somewhat higher memory density, and apparently it
does work all right.  Nothing but the on-chip circuitry ever sees it.
-- 
NASA is into artificial        |     Henry Spencer at U of Toronto Zoology
stupidity.  - Jerry Pournelle  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

albaugh@dms.UUCP (Mike Albaugh) (09/13/88)

From article <6266@venera.isi.edu>, by lmiller@venera.isi.edu (Larry Miller):
>     There was also the IBM 1620, a BCD machine.  Yes, decimal, but
>     all arithmetic was performed using table lookup, floating point
>     in software, so I guess it could be called a nonbinary machine.
	There were _lots_ of BCD (and bi-quinary) machines back when
16K was a lot of memory and a large percentage of problems needed mainly
I/O with a few calculations on each item. The size and speed of the decimal
to binary and back conversion routines would have made them the major
bottleneck. Incidentally, one of the neatest things about the 1620 was that
numbers of arbitrary size could be added/subtracted/multiplied/divided (as
long as they fit in memory). I know at least one number-theory freak who
resented the "restriction" of only 256 byte long numbers when we upgraded
to a System/360. Anyway, the 1620 was still "binary", in the sense of any
one signal being in one of two states.
	The Soviets built a balanced base 3 (radix -3) machine in the
late fifties (reported in IEEE transactions, as I recall), but it too
used binary logic, with each digit stored as two bits.
	I believe Signetics built a fast math chip of some sort (Maybe a
Multiplier?) which actually used base four inside (four discrete current
levels in IIL) and converted to binary TTL outside. This was written up
in EDN or the like about 1980.

> Larry Miller				lmiller@venera.isi.edu (no uucp)
| Mike Albaugh ({decwrl!turtlevax!}weitek!dms!albaugh) voice: (408)434-1709
| Atari Games Corp (Arcade Games, no relation to the makers of the ST)
| 675 Sycamore Dr. Milpitas, CA 95035
| The opinions expressed are my own (My lawyer isn't listening)

pardo@june.cs.washington.edu (David Keppel) (09/13/88)

>[ discussion of troolean logic ]
>
>   AND    0 1 2        OR    0 1 2    INVERSION
>      =========          =========        =====
>      0 | 0 0 0          0 | 0 1 2        0 | 2
>      1 | 0 1 1          1 | 1 1 2        1 | 1
>      2 | 0 1 2          2 | 2 2 2        2 | 0

Another way to think about this is [-1,0,1]; this might
give the same answers as above, although I can imagine:

   AND   -1 0 1        OR   -1 0 1    INVERSION
      =========          =========        =====
     -1 |-1 0 0         -1 |-1-1 0       -1 | 1
      0 | 0 0 0          0 |-1 0 1        0 | 0
      1 | 0 0 1          1 | 0 1 1        1 |-1


    ;-D on  (Don't flame; I'm being provocative, not correct, today)  Pardo
-- 
		    pardo@cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo

smryan@garth.UUCP (Steven Ryan) (09/13/88)

> By the way, does anyone know of a non-mechanical digital calculator or
> computer that isn't essentially binary?

Once upon a time there were rumours of a Russian computer with +voltage,
0 voltage, and -voltage so that it would be base 3.

ok@quintus.uucp (Richard A. O'Keefe) (09/13/88)

> By the way, does anyone know of a non-mechanical digital calculator or
> computer that isn't essentially binary?

Am I the only person reading this group who has heard of dekatron tubes?
These were a 10-stable gadget (I think some sort of gas discharge tube).
If I remember correctly they had one cathode, ten anodes, and some
grids.  The discharge took place between the cathode and one anode, and
an electrical pulse on the grids would shift the discharge to the next
or previous anode.  I know that multi-digit up/down counters were built
with them.  I don't know if anything more complex was done, but it could
have been.  Since the discharge gave off visible light, you could read
of the state of a dekatron counter without a separate display.

msb@sq.uucp (Mark Brader) (09/14/88)

[1] The word is "ternary", not "trinary".   If you want to use the "tri-"
    prefix, you have to say "triadic".  Of course, as with all things in
    language, this is subject to change if "trinary" becomes sufficiently
    popular; the words for bases 8 and 16 both changed when they became popular
    with computers.  (See Knuth, volume 2, sec 4.1; in 1st edition, p. 168.)
    But "ternary" is the accepted form.

[2] Please move this discussion out of comp.lang.c.  Discussion of non-
    binary machines should probably go in comp.arch (I'm cross-posting to
    there and directing followups to it).  If discussion of terminology
    occurs, it should probably go to sci.lang.  Sci.math is another possible
    group for some aspects.

[3] While I'm posting, I may as well point out that the ENIAC calculator
    (or computer, depending on your definition; it was plugboard-programmed)
    of 1945 used decimal, non-BCD arithmetic, but the underlying implement-
    ation was binary; each of the 10 digits in each of its 20 registers
    contained 10 flip-flops each containing 2 vacuum tubes!

Mark Brader			"You can't [compare] computer memory and recall
SoftQuad Inc., Toronto		 with human memory and recall.  It's comparing
utzoo!sq!msb, msb@sq.com	 apples and bicycles."		-- Ed Knowles

news@ism780c.isc.com (News system) (09/14/88)

In article <6266@venera.isi.edu> lmiller@venera.isi.edu.UUCP (Larry Miller) writes:
>>By the way, does anyone know of a non-mechanical digital calculator or
>>computer that isn't essentially binary?
>
>    There was also the IBM 1620, a BCD machine.  Yes, decimal, but
>    all arithmetic was performed using table lookup, floating point
     ^^^
>    in software, so I guess it could be called a nonbinary machine.
>
>Larry Miller				lmiller@venera.isi.edu (no uucp)

Well, actually not quite all arithmetic was by table lookup.  Program counter
incrementing was done with traditional bcd (i.e. binary) add logic.  So I
would call even this machine binary.

BTW: There actually was hardware floating point. The harware supported
floating precision of from 2 decimal digits to an upper bound on precision
limited only by the amount of memory available to hold the data.

   Marv Rubinstein

phil@aimt.UUCP (Phil Gustafson) (09/14/88)

In article <3473@phri.UUCP>, roy@phri.UUCP (Roy Smith) writes:
> mouse@mcgill-vision.UUCP (der Mouse) writes:
> > By the way, does anyone know of a non-mechanical digital calculator or
> > computer that isn't essentially binary?
> 
> 	The bottom line is that digital and binary are essentially
> synonymous, although I suppose in theory you could define digital as
> discrete and have trinary, etc. logic.

Some old (real old, 50's and 60's) counters used 10-state ring
counters to hold digits.  These gadgets are binary as far as logic
levels go but decastable rather than bistable.  They're very much analogous
to wheeled mechanical calculaters.

A fast (for 1967) frequency counter I worked with once had a pentastable
prescalar ring.  Same thing.


-- 
				Phil Gustafson, Graphics/UN*X Consultant
				net address above
				1550 Martin Ave, San Jose, Ca 95126