Setun: The Ternary Computer
Abstract
Setun was the only computer ever built in series on a base other than two. Designed by Nikolay Brusentsov at Moscow State University and first assembled in 1958, it stored numbers in balanced ternary, a system where each digit is -1, 0, or +1. The choice was not eccentricity: base 3 is the integer nearest the mathematical optimum for representing numbers, and it let Setun handle negative numbers without a sign bit and run on fewer components than a comparable binary machine. About 50 were built between 1959 and 1965. Then the Soviet system that had grudgingly allowed it decided that computers were binary, shut the line down, and later destroyed the prototype. Ternary computing has stayed a curiosity ever since.
Why Three
Every positional number system pays a cost that trades off two quantities: how many distinct symbols each digit needs (the base) and how many digit positions it takes to write a given number. Binary needs only two symbols but long strings of them; base 60 needs short strings but sixty symbols. The product of the two, the “radix economy,” is minimized not at 2 but at the base closest to Euler’s number e ≈ 2.718. Among integers that is 3. Donald Knuth noted the same result from the storage angle: balanced ternary needs about log₃2 ≈ 63% as many digit positions as binary.
Balanced ternary, the variant Setun used, assigns each trit the values -1, 0, and +1 rather than 0, 1, 2. This buys a property binary has to fake with conventions like two’s complement: a negative number is just the number with every trit flipped, so there is no separate sign bit and subtraction is addition of a negated operand. Rounding a number is truncation. Comparison reads off the most significant nonzero trit directly. The idea was not new in 1958. The English accountant Thomas Fowler built a balanced-ternary calculating machine out of wood in 1840, and the mathematician Sergei Sobolev, who backed the Moscow project, had argued the theoretical case for non-binary machines.
Brusentsov’s Room
Nikolay Brusentsov (born 7 February 1925 in Kamianske, Ukrainian SSR) was a Red Army signals veteran of the Second World War who studied at the Moscow Power Engineering Institute and joined Moscow State University’s new computing center. On 23 April 1956 he was made lead designer of a small university machine, working in a 60-square-meter room with a handful of engineers and technicians. Sobolev, a mathematician of standing, supplied the theoretical cover and the argument that ternary was worth trying.
The engineering constraint drove the mathematics. Reliable transistors were scarce in the late-1950s USSR, so Setun was built from ferrite cores and semiconductor diodes rather than active switching elements. A trit was stored in a pair of magnetic cores, which mapped cleanly onto three states. Brusentsov reported that the resulting machine needed roughly one-seventh as many active elements as an equivalent binary design and drew correspondingly less power. The first working machine was assembled in 1958 and shown publicly in 1959.
The Machine
Setun’s fast memory held 81 words of 18 trits each, backed by a magnetic drum of 1,944 words, on the order of a few kilobytes in total. It ran at roughly 4,500 operations per second. By the standards of the BESM machines it was slow and small, but it was cheap, sturdy, and, by the accounts of the institutions that got one, easy to program and hard to break. Of the 50 units built, about 30 went to Soviet universities and technical institutes, where Setun earned a reputation as a teaching machine that students could actually understand end to end.
Brusentsov did not stop at the hardware. His Setun-70 (completed 1970) reorganized the architecture around 6-trit “syllables” and a stack-based instruction stream, a design his group argued cut programming effort several-fold and which later commentators noted resembled ideas that would appear in RISC processors. From Setun-70 grew DSSP (Dialogue System of Structured Programming), a Forth-like environment that outlived the hardware: it was ported to ordinary binary machines through the 1980s, a 32-bit version arriving by 1989.
Dead End
Setun’s problem was never that it did not work. It was that it worked on the wrong base for the institutions that controlled Soviet computing.
The machines were built not at the university but at the Kazan Mathematical Machines Factory, whose management had no interest in a low-margin oddity ordered by academics. The factory director had to be compelled to keep the line running by an official decree dated 30 November 1961, and output never rose above 15 to 20 units a year. When foreign buyers in the Eastern Bloc placed orders, the Ministry of Foreign Trade left them unfilled. The Soviet Council of Ministers had meanwhile committed the whole apparatus to binary: first the domestic BESM and Elbrus lines, then, from 1969, wholesale cloning of IBM’s binary System/360 as the ES EVM series (see Soviet and Russian Computing). A ternary machine had no place in a plan built around copying binary hardware.
Production stopped in 1965. Moscow State University replaced its own Setun with a binary computer by 1970. A later university rector labeled Brusentsov’s continued ternary research pseudo-science, moved his laboratory to an attic in a student dormitory, and had the original Setun prototype destroyed. Brusentsov kept working on ternary logic and DSSP until his death in Moscow on 4 December 2014, at 89, convinced to the end that the industry had taken a wrong turn at the base.
Whether he was right is a genuine open question rather than a settled one. Ternary’s theoretical economy is real, but binary won on grounds Setun could not fight: transistors are natural two-state switches, and once the world could mass-produce them cheaply, a component that is on or off beat any scheme that had to synthesize a third state. The writer Brian Hayes, reviewing the episode, argued Brusentsov had not even captured all of ternary’s promised advantage, since a pair of cores that stores three states could store four as two bits. Setun stands as the cleanest test the idea ever got: a working, buildable, teachable ternary computer, killed less by its mathematics than by a planning ministry that had already decided what a computer was.
📚 Sources
- Setun (Wikipedia) — construction, timeline, specifications, Kazan factory, production numbers
- Nikolay Brusentsov (Wikipedia) — biography, Setun-70, DSSP, dates of birth and death
- Ternary computer (Wikipedia) — balanced ternary properties, radix economy, Thomas Fowler’s 1840 machine, one-seventh-elements claim
- Brian Hayes, “Third Base,” American Scientist 89:6 (2001) — balanced ternary mathematics and a critical assessment of Setun’s efficiency
- Balanced ternary (Wikipedia) — negation by trit-flip, sign-free negatives, comparison and rounding properties