Ternary Computing Revisited
Black Acid writes: "American Scientist's Third Base was a nice introduction to the advantages base 3 but didn't really explain ternary computing. Since 1995, Steve Grubb has maintained trinary.cc which covers many aspects of computing with base 3. Not only are the basic unary and binary gates enumerated, which I independently verified as being basic building blocks, but real-world circuits are described also. Half and full adders, multiplexers and demultiplexers, counters, shift registers, and even the legendary flip-flap-flop are all covered with ternary algebra equations and schematics. Steve Grubb touches on problems of of interfacing to binary computers elegantly, although no schematics are given. Perhaps most impressive are the Transistor Models - schematics of the basic gates which can be built from cheap parts available at your local electronic component store."
I beleive a previous article said it was "Less Then", "Equal To", "Greater Then" as opposed to "Equal", "Not Equal"
blah blah blah....
drightler@technicalogic.com
Instead of two voltage levels (traditionally zero or +5 V or something like that), you use three voltage levels. It is usually easiest to use zero, +x V and -x V, but in theory, you could use whatever voltages you like.
However, in stodgy old binary, the levels are typically something like 0 Volts (i.e. "off") and 5 Volts (or 3.5 Volts). A "typical" ternary system would add a negative voltage, like -5V (or -3.5V), since that's easier to detect reliably than an intermediate positive voltage value.
So to answer your question, yes a "third state of electricity" is used, one which was previously being ignored in binary circuits. Instead of on, off, and dim, think of positive, off, and negative.
Easy answer: Signal to Noise ratio renders ternary logic useless. Either it comes at a slower speed than binary logic or at higher power consumption.
In addition - the site design doesnt make it look very credible..
150 Opening BINARY mode data connection for slashdot.sig (129323052 bytes).
Naturally, such systems get enhanced so they can send more data at the cost of a little harmonic purity. For expample, they could get 50% more data through by using pairs of trits to send 3 binary bits. The 9th state would be used to prevent leaving the line at one voltage level too long. The real encodings are better behaved in the analog domain, and therefore more complex, but lookup tables for the trit to binary conversions take very little silicon.
For those who haven't memorized powers of three, if trinary logic, memory or signalling works better in some situation, 1 trit holds 1 bit, 2 trits hold 3 bits, 12 trits hold 19 bits, 31 trits hold 49 bits, etc...
Going the reverse is also very simple. If you have an algorithm that works better in trinary, store 1 trit in 2 bits, 3 trits in 5 bits, 5 trits in 8 bits, etc... You don't need special hardware.
This works for base-2 just as well, as you see the operations are exactly the same.
Please consider making an automatic monthly recurring donation to the EFF
Consider again the task of representing all numbers from 0 through decimal 999,999. In base 10 this obviously requires a width of six digits, so that rw=60. Binary does better: 20 binary digits suffice to cover the same range of numbers, for rw=40. But ternary is better still: The ternary representation has a width of 13 digits, so that rw=39. (If base e were a practical choice, the width would be 14 digits, yielding rw=38.056.) so the theoretical approximate is less than 2% efficiency increase. But what they don't say is that it takes 2 operantions to distinguish a ternary system: v < 1 ? 0 : v < 2 ? 1 : 2 as oppose to binary: v < 1 ? 0 : 1 In the real world you can't do "equal to" because there is the potential for infinite precision -- you can always measure more closely. And you can't measure on/off, because then your circuit is dead and no further calculations can be done. You can't use positive/negative, because you want three. So you need something that can detect voltage levels. The problem is, that if such a device can be created that distinguish 3 different voltage levels, and do so more efficiently than using to binary operations (see above ternary notation :) -- it could also be used to perform 2 binary operations which doubles the efficiency of the binary system
rw = 40 / 2 = 20
almost twice as efficient as the ternary circuit.
Actually, I used base3.org and changed to trinary.cc when the cc domain opened up. Before base3.org, it was available from my personal homepage at gate.net.
-Steve grubb
The last time ternary logic came up, I was disappointed to see no proposed schematics. Now there are schematics, but I'm still disappointed. One thing is that they designed with bipolar transistors rather than CMOS -- you cannot put more than a few thousand bipolar transistors on one chip without serious heatsinking... Beyond that, these designs lack quite a lot in speed, power consumption, and reliability as compared to even the 7400-series of TTL bipolar logic chips of the late 60's. And the first one I looked at doesn't even work.
Their ternary inverter is simply a two-transistor inverting _analog_ amplifier running on +/-3V supplies. If the input is -, Q2 turns on, bringing the base of Q1 low, turning Q1 off, so R2 pulls the output (which isn't explicitly shown) to the + rail. If the input is +, Q2 is off, and apparently this circuit depends on leakage to then bias Q1 on. This brings the output almost to the - rail. So it would work as a binary inverter. It's not nearly as good as a
TI 7404 (see page 2). The major difference is that R2 was replaced by a transistor, which turns on for high. This speeds up the low-to-high transition, since you get the full output current of the transistor until the output node is charged up. It also saves power, because one
output transistor is always off and the other always on, so when not switching only leakage currents flow at the output. (This two transistor output is called a "totem pole", and CMOS similarly depends on transistor pairs, one always off so little current flows.) Two more intermediate transistors are added, to control the top transistor on the totem pole and to reduce the resistor count. (On-chip, resistors are not cheaper than transistors.) But if you used it as a binary circuit, trinary.cc's inverter is basically the stripped-down ancestor of the 7404 circuit.
As a trinary circuit, it also has to take a 0V input and output 0V. This inverter does not do this reliably. It probably could be made to work by adjusting the resistor values until 0.0V in gave 0.0V out, but warm or cool the transistors a few degrees, and the amplifier bias will shift so that the output swings to the + or - rail. When you are trying to put the mid-level through it, you are running it like an analog amplifier, and analog amplifiers are unstable without negative feedback.
Nor would adding a few transistors and a negative feedback loop to stabilize it make it work well enough. A trinary inverter should take an input that is not right at any logic level, decide which level is closest, and output the corresponding nomimal voltage. For highs and lows (2 and 0), it does that, since it pins the output to the opposite rail. But even if you can be sure that 0.0V in = 0.0V out, with a circuit that is basically an analog amp, -0.1V in will give more than +0.1V out. So a chain of gates would allow the logic levels to get worse at each gate, until the mid-level became misinterpreted as + or -. To restore the mid-level would take a much more complicated circuit. I lay no claims to being a good designer at the transistor level, but I can't see any possibilities that are not nearly twice as complex as the corresponding binary circuits.
The cost of representing a particular number in a given base depends on a) how many digits there are in the number in that base, and b) how many digits there are in the base This assumes that the cost of increasing the base is the same as the cost of increasing the number of digits. There is no particular reason to expect this to be true. So far as I can tell, it definitely is not true when comparing the transistor count of binary, trinary, and higher bases. The step from binary to trinary is a big one -- either your gates are like analog circuits, or they are essentially a double binary gate (100% more circuitry for 50% more states/bit). The step from 3 to 4 is not nearly as big...
I dissected their inverter circuit in a different post -- in short, it won't work for the intermediate level, and in fact closely resembles a primitive ancestor of TTL binary.
This is not to say that higher bases are always and everywhere a bad idea in electronics, just that you need to be cautious when taking designs from someone who hopes someone else will build them... Transistors are becoming much cheaper than wires, and higher bases really save on wires. So does time-division multiplexing (e.g., sending the bits twice as fast on half as many wires), and at this point we better know how to do this, and can make it work more reliably at lower cost as compared to trinary. Eventually, multiplexing will hit some sort of practical speed limit, and then sending multi-level signals may be cost-effective. I just don't see any particular reason to stop at 3.