The Ternary Manifesto (2012)
homepage.divms.uiowa.edu
homepage.divms.uiowa.edu
"Donald Knuth argues that [ternary computers] will be brought back into development in the future to take advantage of ternary logic's elegance and efficiency."
https://en.wikipedia.org/wiki/Ternary_computer#Potential_fut...
Ternary logic is an enormous space, mathematically. In two value Boolean, there are 16 distinct binary operators, many of which are useless values (such as identity). We're basically left with the family of NAND/NOR/XOR and their complements. NAND/NOR, or their complement and NOT, are universal and can construct the rest. In some 3VL like Kleene, there's 3^9 (about 20,000) possible operators, many of which are logically universal.
Boolean NAND and AND-OR-INVERT are universal and map very nicely to CMOS. But it's likely many (as in dozens or hundreds) of different universal gates in 3VL map nicely into electronic structures. (Assuming the existence of circuits for 3VL.) It's such a large space to explore that we've only begun to scrape the surface.
If you impose this symmetry condition on ternary operators, the huge number of 19683 operators is cut down to 729. Three of those are stuck to one of the three output states and can be ignored as well. If you additionally require that changing an input from 0 to 1 (or to -1) can not make a definite (non-zero) output to 0 (less certain) nor flip it, you cut the total list of operators down to just 64 operators.
Of course 64 operators is much more than 6, it is not as bad as going from 16 to 20k.
More generally, if you allow composition of a permutation of the trit values 'for free', (eg, F(x,y) + 1 is 'free' given F) you get to reduce the 'atomic' operations by a factor of 6. This is the same as collapsing 'G' and 'not G' among binary operators.
But I guess you've got to implement these in circuits at some point, so the symmetries aren't necessarily helpful (eg, NAND is a thing, rather than AND composed with a symmetry?). (caveat: i am, obviously, more a mathematician than a circuit designer. :P )
The second reduction that I mention is actually to require every F to satisfy either F(-1,y) <= F(0,y) <= F(1,y) OR F(-1, y) >= F(0,y) >= F(1,y).
And no the symmetries are not that useful to implement the circuitry, but are nice to select operators that compose nicely and allow many simplifications (think De Morgan's laws)
Why does it make sense to require those conditions?
Phrased a little differently: radix economy is obsolete - you should be using the Shannon channel capacity limit to analyze the system's information density.
I used a sort of balanced heptavintimal representation which differs significantly too. Where positive 3-trit values were represented as expect (0-D) and negative values were represented by the lowercase equivalent of the positive for letters and the symbol above the positive number key on a standard US keyboard. So for instance the number "--00-+-++" would be "c@%".
I chose a 9-trit "tryte". Each group of three trits was a called a "tone". Why "tone"? Because in the elaborate back story of the computer's creation one of its primary functions was playing simple music compositions. 3 trits yields 27 values or silence (0) and one octave each above and below including sharps and flats. A grouping of 3 such "tones" is a "tritone" or "tryte" (the spelling with 'y' helps disambiguate from 'trit' when reading).
The backstory for this thing was actually significantly more elaborate and complete than the emulator ever was. I did work out how to do parity-block style error recovery with ternary though.
The main problem I see, unaddressed in my skimming, is the analog level: you need to replace the transistor with something more sophisticated, or possibly two different types of transistors.
Worth noting: SSDs do store data in multi-level cells (generally with much more than 3 levels) to get better density out, but they can get away with this because the performance requirements are much lower than those of a CPU and it's not doing any actual logic, just translation.
Perhaaaaps if we had photonics with polarization signalling in 3 axes....
Building a ternary computer requires you to think completely outside the box. You even have to pick which kind of ternary "Boolean" logic you'll use, as there's no consensus on how 3VL should work. Then fill out all the 3^9 possible basic logical operations and pick a few logically universal ones as building blocks. And then you have to design circuits to implement them. And none of your existing bit-twiddling logic designs -- or algorithms -- will work. It's total re-invention of the wheel, really.
But it's mostly a thought experiment. While there are theoretical advantages, ternary machines are, in honesty, unlikely to ever offer any real advantage over binary ones. More electronic complexity for something you can trivially simulate on a binary machine. But it does make you think.
> While this work began as something of a joke, there are some very serious reasons that ternary logic may have value.
So, it's semi-serious.
var resultofexpression = conditionasboolean ? truepart: falsepart;
You can actually get away with /never/ using if...else statements and do everything with ternary operators, but it's harder to comprehend the code.Also as a separate observation: Adding quantum computers into the mix of these writings would really jazz it up.
[0] https://www.javascripttutorial.net/javascript-ternary-operat...
“The thing about cars is that everybody already knows how to ride a horse, and you can find a stable in any village in Europe. They work even on rough roads and they are much cheaper. Their “fuel” can be found basically anywhere. Cars may be nice but I can’t see them winning out.”
No claim that ternary is to cars as binary is to horses; I think the difference is way less. But its a fun way to think about the argument “we won’t change because the existing technology has too many decades behind it.”