DEV Community

Cover image for The Balanced Ternary Machines of Soviet Russia

The Balanced Ternary Machines of Soviet Russia

Andrew Buntine on November 21, 2016

"Perhaps the prettiest number system of all is the balanced ternary notation" - Donald E. Knuth, The Art of Computer Programming, Vol. 2. It's p...
Collapse
 
davecan profile image
David Cantrell

This is a fantastic article. FYI the IOTA project has a prototype ternary microprocessor (called JINN) and they are working on plans for widescale adoption in Internet-of-Things devices. Specifically it will provide low-power high-velocity nanotransactions. They have their own "cryptocurrency" token with it as well. So we may see a resurgence in ternary coming soon. (or maybe not, who knows?)

Collapse
 
joevansteen profile image
joevansteen

Thanks for an interesting read. Given what you've pointed out about the relative efficiency of ternary over binary, it brought two thoughts to my mind:
1) That there might a lot to be gained from from a more cooperative open communication about advanced research in both science and engineering across what are artificial national/cultural bounds. That said with an understanding of why we weren't necessarily pushing computer "secrets" to each other in the late 50s, and also understanding that "momentum" has other advantages in capturing a market beside being "best of breed."
2) I wonder what kind of encoding patterns we search for in the SETI data. Did we use binary on Project Voyager? What if everybody else "out there" speaks ternary?

Collapse
 
thomasthespacefox profile image
Thomas Leathers

Quite an interesting read. Though i must say i probably have a bigger understanding of balanced ternary than most, given that i am chief developer of the SBTCVM project, a project that aims to create a balanced ternary virtual machine. The Setun computers are quite a fascinating bunch.

SBTCVM really started with one night browsing wikipedia, and coming across balanced ternary, and in turn an article on Setun. the basic idea was i wanted to work with balanced ternary on binary computers.

When I started the actual VM itself, i had gotten an integer mathematics library up and running, and figured id put it to use. And while SBTCVM has its own architecture design (that's mainly a result of the development process), The Setun machines were and are a key inspiration.

Collapse
 
maxvonhippel profile image
Max von Hippel

Wow! Phenomenal article. I had been under the massively mistaken impression that ternary computation required quantum computers (if they exist) - clearly I fundamentally misunderstood both quantum and more importantly ternary computation.

Do you know of any particularly good (preferably mathematics-heavy) books on alternative or "non-standard" modes of computation such as those discussed here?

Thank you!

Collapse
 
illiteratus profile image
Illiteratus

Great stuff! Heard about it for the first time and I'm really surprised that it wasn't adopted widely before....
The only technical advantage in binary I can imagine is, that without an "off" state as value-representation you don't need any special check for invalid "trits" due to physical damage.

Collapse
 
eekee profile image
Ethan Azariah

Interesting! Heard of Setun before, but was looking for more information on DSSP. Thanks for the code and link. The DO ... [] structure looks more elegant than traditional/standard Forth's DO ... LOOP (but Charles Moore didn't like DO LOOP anyway). I'm a bit sorry to hear there's not much information on it, but as it appeared in the late 70s, it could simply be a clone of Forth which appeared over 5 years earlier. If not, or perhaps even if it was, it's amusing that DSSP was said to be "found", because Charles Moore also described himself as the discoverer rather than inventor of Forth. :) Oh, Ivan Tikhonov described DSSL as "inheriting" things from Forth.

Regarding the hardware, I had a bit of a go in a cheap simulator, and was not impressed. Not being very familiar with inductors, I used transistors, and was not able to find a configuration equal to binary CMOS. I'm not surprised to hear the Setun needed 2 coils per trit, which is actually only only 3/4 the packing density of binary core memory. Binary core memory was itself huge, requiring about a cubic foot per kilobyte! Add to all this the very high cost of producing practical software in the Setun's era, and I can entirely understand the Soviet administrators' decision to replace the Setun with computers more nearly compatible with foreign software. Low power consumption seems to be the Setun's only advantage, and from my experiments I'm almost certain this could not be have been maintained into the transistor era. I was not able to find anything close to the power- or space-efficiency of CMOS.

I sometimes wonder how to efficiently emulate a balanced ternary computer, but it really is an academic fantasy as the Soviet administrators said. The Josephson junction thing has me a little bit curious, but I'm cautious because I don't know what logic could actually be done with it and what support each junction would require.

Collapse
 
cryptotonio profile image
TonioEs

where is the article ?? T_T

Collapse
 
buntine profile image
Andrew Buntine

It looks like a bug with dev.to - I will open an issue.

Collapse
 
meiota24 profile image
Ivan M.

Pay attention to IOTA and Jinn processors. Ternary is coming.

Collapse
 
cryptotonio profile image
TonioEs

Very cool article ! Thanks

Collapse
 
danhomola profile image
Dan Homola

Great article! I wasn't aware of this.
One minor typo, though, in your fourth example (encoding -114) there are few too many minuses I believe.

Collapse
 
buntine profile image
Andrew Buntine

You are right! Fixed :)

Collapse
 
sloan0708 profile image
Sloan0708

Is there something I missed cause I can't see the article....

Collapse
 
buntine profile image
Andrew Buntine

It looks like a bug with dev.to - I will open an issue.

Collapse
 
ss20611 profile image
blockchain_boys

Awesome article!