Ternary Numeral System: The Soviet Setun Computer

The ternary numeral system is a counting method built on just three digits, 0, 1, and 2, and it briefly powered real machines in the 19th and 20th centuries. English inventor Thomas Fowler built a calculating machine that ran on base 3 logic, and more than a century later the Soviet Union produced the Setun computer, a working ternary machine that quietly proved base 3 computing was possible. Long before silicon chips made binary the global standard, engineers were already asking whether two states were really the best we could do.
The ternary numeral system uses three digits, 0, 1, and 2, instead of the two digits binary relies on. Thomas Fowler built a ternary calculating machine in the 19th century, and the Soviet Union later built the Setun computer, which ran on base 3 logic. Both demonstrated that ternary computing is genuinely workable, though binary ultimately won out for practical reasons.
- The ternary numeral system is a base 3 counting system that uses only the digits 0, 1, and 2.
- English inventor Thomas Fowler designed and built a ternary calculating machine in the 19th century.
- The Setun computer, developed in the Soviet Union, was a working ternary machine built in the late 1950s.
- Ternary logic was shown to be workable in practice, yet binary became the dominant standard for modern computing.
- The main appeal of base 3 computing is that each digit carries more information than a binary bit.
Beyond Zero and One: Meet the Ternary Numeral System
Every computer you have ever used speaks a language with exactly two words: zero and one. Flip a switch, and you get a one. Leave it alone, and you get a zero. That is binary, and it has powered the digital world for decades. But here is the twist that catches most people off guard: the ternary numeral system, also called base 3, uses three digits instead of two, namely 0, 1, and 2. A third option exists, and it changes the math in surprising ways.
Start with something familiar. In everyday life we count in base 10, and our computers count in base 2. Neither is a law of nature. Mathematics happily lets you build a number system on 3, on 5, or on whatever base you like. The catch is that correctness is not the only thing that matters. Aesthetics and convenience count too. Who genuinely wants to write a phone number in base 245?
So why does base 3 deserve a closer look? Because it is not just a curiosity. In several ways, ternary beats the binary system our machines depend on, and it does so without demanding a wildly more complicated physical setup.
Here is a concrete taste of how it works. Take the decimal number 16. To write it in base 3, you build it from powers of three, and you land on the string "121". Check the arithmetic: 1×3² + 2×3¹ + 1×3⁰ equals 9 + 6 + 1, which is 16. Same value, different clothing.
The efficiency story is where ternary starts to shine. Two binary bits give you 4 distinct values, since 2² = 4. Two ternary digits, called trits, give you 9, since 3² = 9. Each ternary digit carries roughly 1.585 bits of information, the value of log₂3. That is more information packed into the same number of positions.
Push the idea to its limit and something elegant appears. If you allow the base to be any real number rather than a whole one, the most efficient base for computation turns out to be Euler's number e, about 2.718. Ternary sits remarkably close to that theoretical sweet spot, which is exactly why it keeps resurfacing in conversations about computing.
Quick check
- Base 2 digits: 0 and 1
- Base 3 digits: 0, 1 and 2
- Two binary bits: 4 values. Two ternary trits: 9 values.
- One ternary digit carries about 1.585 bits.
None of this means base 3 is a magic fix. A larger base like base 4 or base 5 carries even more information per digit, yet it also demands more physical states to represent, more complexity, and more energy. Ternary happens to sit in a rare pocket where information density rises while physical complexity stays manageable. That balance, more than any single number, is what makes it worth studying.
How Does the Ternary Numeral System Actually Work?
To write the decimal number 16 in base 3, you line up the place values of the ternary numeral system and read the digits off. The result is "121," as we saw above. Three symbols, three positions, one exact answer.
That is the whole trick of ternary. Where binary gives you two digits, 0 and 1, ternary gives you three: 0, 1, and 2. A binary digit is a bit. Its ternary counterpart, a digit with three possible states, is called a trit. The names sound almost identical. The arithmetic behind them does not.
Start with a simple count. Two binary bits hold four distinct values, because 2² = 4. Two trits hold nine, because 3² = 9. Nine instead of four, from the same number of slots. That gap is where the story gets interesting, and it is also where a lot of people jump to the wrong conclusion.
Each trit carries log₂3, which comes out to roughly 1.585 bits of information. A bit carries exactly 1. So a single ternary digit is denser, packing more meaning into the same slot. You might assume the pattern keeps rewarding bigger bases, that base 4 or base 5 would be even better.
It does not work that way. Density is only half the ledger. The other half is physical cost: every added state a digit can take means more voltage levels, more circuitry, more energy burned to keep those states apart. Base 4 gives you 2 bits per digit, a real gain in density, but the hardware complexity climbs alongside it. At some point the extra states stop paying for themselves.
Run the math on that trade-off and something strange falls out. If you let the base be any real number at all, not just a whole one, the most efficient base for computation is Euler's number e, about 2.718. The optimum does not land on 2. It does not land on 3 either. It lands on a number that no counting system can actually use, which makes 3 the closest practical neighbor to the theoretical sweet spot. Ternary sits right next to the mathematical ideal. Binary sits a step further away.
The comparison in one glance:
- Two bits: 2² = 4 distinct values, 1 bit of information per digit.
- Two trits: 3² = 9 distinct values, about 1.585 bits per digit.
- Optimal base, if any real number were allowed: e ≈ 2.718.
There is a second advantage that has nothing to do with storage density. Ternary logic can answer a question with three outcomes instead of two. Ask whether x is less than y and binary forces a yes or no, so you need a follow-up question to sort out equality. In ternary you ask once: is x greater than, less than, or equal to y? One question, three answers, done.
Denser digits, fewer comparison steps, and a theoretical optimum sitting at 2.718. On paper, ternary looks like the system we should have built everything on. So why is your laptop running on ones and zeros?
Why Don't We Use Ternary Computers Then?
Here is the puzzle in one line: a ternary digit carries about 1.585 bits of information (log₂3), so two trits can hold 9 distinct values while two binary bits hold only 4. More information per digit, fewer digits needed, less physical hardware. So why is every laptop on your desk still binary?
Because efficiency is never judged on one axis. The real calculation weighs how well a system represents and processes data against the hard limits of building it in the physical world. A bigger base does pack in more information per digit, but each digit now has to hold more distinguishable states. Quaternary needs four states, quinary needs five, and every extra state means a more complex physical representation and more energy burned to keep it stable. The gains stop paying for themselves.
If you let the base be any real number at all, the mathematically most efficient base for computation turns out to be Euler's number, e ≈ 2.718. Three sits right next to it. That is the narrow window the ternary numeral system occupies, and it is a genuinely good one.
There is a second, quieter advantage: three-way logic. Suppose you want to compare two numbers, x and y. In binary you have to ask twice. First, "is x less than y?" If the answer is no, you ask again: "is x equal to y?" Only then do you know whether y is smaller. In ternary, one question does the whole job, "is x greater than, less than, or equal to y?", because the system already speaks in three states: 0, 1, and 2.
And yet ternary never became widespread. Not because the math failed, but because a global industry had already committed to two states, and switching costs more than the elegance is worth.
Thomas Fowler's 19th-Century Ternary Calculating Machine
Thomas Fowler was a self-taught British inventor and mathematician who, in the early 19th century, built a calculating machine around the ternary numeral system. He designed it to serve the financial needs of his era, and by working in base 3 rather than base 2 it packed more information into each digit and simplified complicated arithmetic. The world, as it turned out, was not ready to care.
Picture the scene. Britain in the 1800s ran on pounds, shillings and pence, a currency that punished anyone doing sums by hand. A device that could crunch those numbers faster and more densely than a binary machine was, in theory, a gift. Fowler's machine used the ternary numeral system, the same base-3 logic that uses the digits 0, 1 and 2. Accounts place the machine around 1840, though that exact year is hard to pin down with confidence.
What makes the choice interesting is the arithmetic underneath it. In ternary, the representation "121" equals the decimal number 16, because 1×3² + 2×3¹ + 1×3⁰ works out to 9 + 6 + 1. A single ternary digit carries roughly 1.585 bits of information, since log₂3 lands near 1.58496. Two binary bits can hold 4 distinct values; two ternary trits can hold 9. That is the density Fowler was reaching for, decades before anyone had the vocabulary for it.
Here is the part that stings. Fowler's invention landed in a technological and scientific climate that simply had no room for it. No industry picked it up, no institution carried it forward, and within a generation the machine had slipped out of memory almost entirely. A self-taught man solved a problem the professional world had not yet recognized, and the answer sat on a shelf.
The Setun: The Soviet Union's Ternary Computer
In 1958, at Moscow State University, mathematician Sergey Sobolev and computer scientist Nikolay Brusentsov built a machine that did not think in ones and zeros. They called it the Setun, and it ran on the ternary numeral system. The Setun became operational in the late 1950s, designed specifically for Soviet scientific research at a moment when computing power was a matter of national prestige.
Here is the twist that makes the Setun more than a historical curiosity. It did not use the ordinary ternary digits 0, 1, and 2. It used balanced ternary, where each digit is 0, 1, or -1. That choice was not decoration. Balanced ternary lets a machine represent negative numbers without a separate sign, which simplifies arithmetic at the hardware level. Sobolev led the project, Brusentsov was the key designer, and together they turned an elegant mathematical idea into working silicon and wire.
The Setun was not a one-off laboratory prototype. Dozens of these machines, commonly cited as around 50 units, were built and put to work in scientific projects across the Soviet Union. For a while, a ternary computer was a real, humming, installed piece of equipment, not a thought experiment.
So why did it fade? The answer has almost nothing to do with mathematics and everything to do with markets. Binary logic had already locked in the global computer industry. Every chip, every standard, every supplier assumed two states. A machine that needed three had no ecosystem to plug into. The Setun's popularity stayed limited, and the ternary numeral system lost the battle not on merit but on momentum.
It is a strange kind of defeat. The Setun proved the idea could ship. The market simply never gave it room to grow.
Could Ternary Computing Make a Comeback?
Yes, ternary computing is quietly returning. Over the past few years, researchers have made fresh progress with the ternary numeral system, and today engineers are combining binary and ternary logic to build systems with lower error rates. The old idea never died. It just waited for the hardware to catch up.
Look at what keeps pulling people back. Energy efficiency is one draw. Information density is another: a single ternary digit carries roughly 1.585 bits, so the same physical space holds more meaning. And then there is the sheer convenience for complex logic. A machine working in three states can ask a richer question than a machine stuck in two.
Binary still runs the world, of course. Every laptop and phone on your desk speaks it. But the mathematical and technological advantages of ternary suggest it could power more innovative applications ahead. When you weigh energy, density and logical ease together, the case does not fade with time. It sharpens.
So the story that began with a forgotten nineteenth-century machine and a Soviet computer is not finished. It is being rewritten right now, one hybrid design at a time.
Frequently asked questions
What is the ternary numeral system and how does it work?
The ternary numeral system is a base-3 counting system that uses only the digits 0, 1 and 2. Each position is worth three times the one to its right, so the string "121" works out to 1×9 + 2×3 + 1×1, which equals the decimal number 16.
Why do computers use binary instead of ternary?
Binary won because its two states are simpler and cheaper to build in physical hardware, and the global computer market standardized on it. Ternary is denser, since each digit carries roughly 1.585 bits of information, but that advantage never outweighed the practical ease of a two-state machine.
What was the Setun computer and who built it?
The Setun was a ternary computer developed in 1958 by Soviet mathematician Sergey Sobolev and computer scientist Nikolay Brusentsov. Built at Moscow State University, it ran on balanced ternary using the digit values 0, 1 and -1, and dozens of the machines were produced for Soviet scientific projects.
Is ternary computing more efficient than binary?
It is denser: two trits hold 9 distinct values, while two binary bits hold only 4. Push the base higher, though, and the advantage slips away, because quaternary or quinary digits demand more physical states and more energy to represent, which cancels out the gain in information density.
What is balanced ternary and why does it matter?
Balanced ternary is a variant that swaps the digit 2 for -1, giving a set of values -1, 0 and +1. It matters because it is the scheme the Setun actually ran on, and it lets a single comparison question return three answers instead of two.
Did the Soviet Union really build a ternary computer?
Yes. The Setun, built at Moscow State University and operational in the late 1950s, was a working ternary machine. Dozens were manufactured and used in scientific work, though the global dominance of binary kept it from spreading further. Editorial note: Any details that remain unconfirmed are presented as such and hedged accordingly.
Got a take on this? Add your voice to the conversation below →
No comments yet. Be the first.