Re: [HM] base 5

James A Landau (JJJRLandau@aol.com)
Wed, 14 Apr 1999 21:18:36 EDT

Re: [HM] base 5

On 99-04-12 23:19:05 EDT SANDIFER@WCSUB.CTSTATEU.EDU (Ed Sandifer) wrote:

> I learned a base 3 arithmetic using the digits +1, 0 and -1, from
> R. W. Hamming at the University of Pennsylvania in the summer of 1967.
> At the time, he thought that perhaps core memory could be designed to
> have either no magnetic field, a clockwise one, or a counterclockwise
> one, and so that perhaps this base 3 arithmetic would become the
> "natural" base for computer applications.
>
> To my knowledge, he was only wrong about a very few things.

A man I worked with in the summer of 1966 told me that there was current work
on what he called "tercedentary computers" (unfortunately he never gave me
any details), so Hamming had company in his idea of base 3 computers.

I have no idea what Hamming himself was thinking, but from a general
knowledge of computer history plus personal experience as a programmer going
back to 1966, I think I can explain both why base 3 computers were being
thought of then and why they were never built.

In those days a typical computer had an arithmetic-logic unit ("ALU"), main
memory
(what we now call "RAM" and then was generally called "core storage"), mass
memory (magnetic tape, disk, and drum), and unit-record peripherals (printer,
card reader, card punch, paper tape).

If a base-10 ALU could be built, then so could a base-3 ALU. A high-speed
number-crunching ALU would require considerable work in logic and electrical
engineering, but a low-speed "proof-of-concept" unit could be built by
modifying the design of a base-10 unit.

Magnetic tape, disk, and drum storage were cheap, so cheap that it would be
acceptable to represent a base-3 digit ("trit"?) by using two binary digits.

Unit record peripherals were either base-10 (e.g. printers) or hopelessly
binary (e.g. paper tape) but the binary ones like cards and paper tape were
cheap enough that no one would care that they remained binary.

That left main memory, which was the crux of the whole idea. Note that
Hamming was not quoted above about logic elements etc. but about core memory.

Now core memory was expensive (I believe all those little ferrite cores had
to be threaded by hand) and the faster the memory the higher the price. Now
21 trits will represent a larger range of numbers than will 32 bits and 20
trits will represent up to 3.48M, which is almost the 4.2M that unsigned 32
bits will give you. Hence if core could be coaxed into representing base 3,
there would be a savings of over one third in the price of the needed core
stacks for a given size memory.

Presumably it was the economics of minimizing the cost of core memory that
drove the base-3 computer concept.

So, what happened to the base-3 computer?

Its window of economic opportunity closed as the 1960's came to an end.
First there was virtual memory, which could be used to economize on the
amount of core needed for a given application (although its general use was
in time-sharing, to allow a large number of users to think each had a
reasonable-size address space). By the mid-1960's General Electric was
pushing virtual memory and even IBM, then very batch-oriented, was selling a
virtual memory computer (the 360 model 67, which was something of a flop).
Then around 1969 IBM introduced a computer (the 360 model 85) which had cache
memory, thereby allowing a computer with slower, cheaper core to match the
throughput of a simpler machine with more expensive core.

Then sometime around 1970 IBM actually delivered a computer that had no core
at all---the 360 model 95 which had something called "thin-film memory".

Finally, and most important, integrated circuits were making great strides
throughout the 1960's. If memory serves, I saw my first pocket calculator in
1969 (it then sold for $700). Very few people other than hardware
specialists were aware of it, but by 1967 integrated circuits were already at
the point where one could visualize building a main memory out of them that
was cheaper than core and be taken seriously.

So Hamming was not deluded, he merely was researching what was in 1967
already becoming a blind alley. If he had developed a ternary core in 1960,
when transistors and microcode were making CPU design much easier, he might
have built a working base-3 computer and we would still be arguing whether
binary or ternary was the better idea.

James A Landau