← All posts

Article

Why Ternary Computing Keeps Challenging Binary

Why radix economy points toward base 3, what Setun proved, and why engineering trade-offs still keep binary dominant.

Information TheoryHardware

The story of computing is filled with elegant solutions born from practical constraints. Binary computing (the foundation of every smartphone, laptop, and server humming around us) represents one of humanity's greatest engineering achievements. Yet one simplified mathematical model of radix efficiency points to a nearby alternative: ternary.

What makes this story even more fascinating? The optimal solution is governed by the same mathematical constant that describes population growth, compound interest, and radioactive decay.

Euler's number e between binary (0/1) and balanced ternary (-1, 0, +1) trees, illustrating efficiency E = log2(r)/r and why ternary is closest to the optimal base e
In the classic radix-economy model, Euler's number e is the optimum and ternary (3) is the nearest integer. Real circuits introduce additional trade-offs.

Understanding Binary: The Foundation We Built

Binary systems operate on beautifully simple two-level logic: on or off, high or low voltage. Each position in a binary number can represent exactly two states, which we call 0 and 1. This simplicity became the bedrock of the digital revolution, enabling the creation of reliable, mass-producible computer systems.

The elegance of binary lies in its clarity. A switch is either on or off. There's no ambiguity, no middle ground to misinterpret. This binary certainty allowed engineers 80 years ago to build the first reliable digital computers with the technology available to them.

The Mathematics of Information: Why Ternary Carries More

To understand why ternary might be superior, we need to dive into information theory, one of the most beautiful branches of mathematics.

Here's the key insight: information is fundamentally about distinguishing between possibilities. The more possibilities you can distinguish, the more information you can encode.

In information theory, we measure information using a logarithmic scale. If you have r possible symbols to choose from, each symbol carries log₂(r) bits of information. Let's break this down:

Why logarithms? Because information compounds exponentially. With 2 binary digits, you get 2² = 4 combinations. With 3 binary digits, you get 2³ = 8 combinations. The logarithm inverts this relationship: if you can distinguish between 8 possibilities, you need log₂(8) = 3 bits to encode that information.

The mathematical derivation:

  • Binary (2 symbols): log₂(2) = 1.000 bit per symbol
  • Ternary (3 symbols): log₂(3) ≈ 1.585 bits per symbol
  • Decimal (10 symbols): log₂(10) ≈ 3.322 bits per symbol

The key takeaway: A ternary digit carries exactly 58.5% more information per digit than binary, a precise mathematical relationship describing how information scales with choices.

But observant readers will notice something intriguing: decimal carries even more information per symbol at 3.322 bits. So why isn't base-10 the obvious winner? The answer reveals one of mathematics' most elegant optimization principles.

The Mathematical Sweet Spot: Euler's Number and Radix Economy

While decimal digits carry even more information per symbol, there is a trade-off between information density and the cost of distinguishing more states. A classic abstraction called radix economy models that trade-off by assuming the cost of a digit is proportional to the size of its radix.

The efficiency of any number system is captured by this elegant equation:

Efficiency E(r) = log₂(r) / r

Where:

  • Numerator (log₂(r)): Information content per symbol
  • Denominator (r): Hardware complexity (number of voltage levels to maintain)

Here's where mathematics becomes breathtaking: when you solve for the maximum of this function using calculus, you get r = e ≈ 2.718...

Yes, that's Euler's number, the same mathematical constant that governs the most fundamental processes in nature:

  • Compound interest: Jacob Bernoulli discovered e while studying continuous compound interest, finding that (1 + 1/n)^n approaches e as n approaches infinity
  • Population growth: Exponential growth models using e^(rt) describe how bacteria, populations, and biological systems naturally expand
  • Radioactive decay: The exponential decay function e^(-λt) describes how radioactive materials lose energy over time
  • Normal distribution: The probability density function that describes countless natural phenomena contains e in its mathematical foundation
  • Continuous processes: Any system where the rate of change is proportional to the current value naturally involves Euler's number

The useful implication: Under this particular cost model, base-e ≈ 2.718 represents the best balance between information per digit and cost per digit.

Since a positional radix uses a whole number of symbols, ternary (base 3) is the nearest integer to that model's optimum. That is an intriguing result, not a proof that ternary hardware is universally better. Noise margins, threshold generation, transistor count, interconnects, memory, and fabrication technology all change the real engineering cost.

A Practical Example: The Million-Number Challenge

Let's examine the toy cost model for representing 999,999 (nearly one million) across different systems:

Decimal System: 999,999 (6 digits)

  • Needs 6 positions, each distinguishing 10 voltage levels
  • Total complexity: 10 × 6 = 60 "units of engineering difficulty"

Binary System: 11110100001000111111 (20 bits)

  • Needs 20 positions, each distinguishing 2 voltage levels
  • Total complexity: 2 × 20 = 40 units

Ternary System: 1212210202000 (13 trits)

  • Needs 13 positions, each distinguishing 3 voltage levels
  • Total complexity: 3 × 13 = 39 units

What the example shows: Ternary has the lowest score under the model's deliberately simple assumption that each additional symbol adds the same unit of implementation cost. Actual circuits do not obey that assumption exactly, so this is an intuition pump rather than a hardware benchmark.

The Soviet Experiment: Setun and the Road Not Taken

The story becomes even more compelling when we realize that ternary computing wasn't just theoretical speculation. It was actually built and proven to work.

In 1958, at Moscow State University, Nikolay Brusentsov and his team, working with support from Sergei Sobolev, developed the Setun ternary computer. A later history co-authored by Brusentsov describes its architecture, production, and use.

Fifty Setun computers were manufactured between 1959 and 1965 and used at universities, research laboratories, and industrial sites across the Soviet Union. Setun demonstrated that a practical ternary architecture could be built and operated; it did not settle the broader question of which radix is best across technologies and workloads.

But the timing was catastrophic. By 1958, IBM and Western computing companies had already fully committed to binary-based transistor computers, with massive investments and established supply chains. Although the Setun performed equally well as contemporary binary computers, and cost 2.5 times less to produce, the global computing ecosystem had already locked onto binary standards.

The Soviet government eventually decided to abandon original computer designs and encouraged cloning of existing Western systems to align with global standards. Brusentsov's lab was relocated to a windowless attic in a student dormitory, support was withdrawn, and the original Setun prototype, which had worked faithfully for seventeen years, was destroyed.

The lesson: A promising mathematical model is only one input into an engineering ecosystem. Reliability, manufacturing maturity, standards, software, and economics can matter more than radix economy.

Balanced Ternary: Mathematical Elegance in Number Representation

There's an even more elegant variant of ternary computing called "balanced ternary," which reveals something beautiful about the nature of numbers themselves.

Using -1, 0, +1 Instead of 0, 1, 2 Is Mathematically More Elegant

In binary representation, negative numbers require additional complexity:

  • The number 2 = 10 (2 bits)
  • The number -2 = 10 + sign bit = 110 (3 bits)

But balanced ternary uses three symmetric states:

  • -1 (negative)
  • 0 (zero)
  • +1 (positive)

Signs are built into the system! To make any number negative, you simply flip each digit's sign:

  • Number 5 in balanced ternary: 1(-1)(-1)
  • Number -5 in balanced ternary: (-1)(1)(1)

This symmetry isn't just elegant. It's computationally powerful. Many algorithms become simpler when the number system naturally handles positive and negative values with equal ease. Binary computers require complex schemes like two's complement arithmetic, while balanced ternary makes the symmetry of mathematics explicit in the hardware.

Why We're Still Stuck with Binary: The Infrastructure Lock-In

If ternary is mathematically attractive under radix economy, and the Soviets proved it could work, why does almost every general-purpose computer still use binary? The answer is partly path dependence and partly that binary remains extremely effective in physical circuits.

The engineering challenge: Physical signals are noisy. Reliably distinguishing three voltage regions requires additional thresholds and tighter noise margins than distinguishing two. Binary's two-state simplicity made it an especially practical path for reliable, scalable logic.

The historical lock-in: Engineers in the 1940s unknowingly chose the less mathematically optimal system, not because they made the wrong decision, but because mathematics demanded engineering capabilities that wouldn't exist for decades. By the time those capabilities emerged in the late 1950s, the entire computing industry had already committed enormous resources to binary infrastructure.

The network effect: Once binary became standard, every component, every software system, every manufacturing process, and every engineer's education reinforced that choice. The cost of switching became prohibitive, even as the technology to support ternary became available.

This resembles other technologies where standards, compatibility, and accumulated infrastructure strongly constrain later choices.

The Universal Language of Information

Here's something fascinating: we measure all information in "bits" regardless of the storage system, just like we measure all energy in "joules" whether it comes from coal, solar, or nuclear power.

When we say a ternary digit carries "1.585 bits," we're using binary digits as the universal unit of information measurement. It's like saying "this ternary digit is worth 1.585 binary digits in information content."

Why "bits" became universal: Binary computing arrived first, and information theory developed alongside early binary computers. The term "bit" (binary digit) became the standard unit because it defined the field, much like how "horsepower" still measures car engines long after horses left the roads.

Modern Ternary Research: Promising, but Not a Seamless Transition

Ternary logic remains an active research area. Recent patents and papers propose gates, arithmetic circuits, memories, and computing-in-memory designs using CMOS, carbon-nanotube transistors, memristors, and hybrid devices.

Huawei, for example, filed patent application CN119652311A in September 2023 for ternary logic-gate and computing circuits. The application describes circuits for ternary increment/decrement functions and claims potential reductions in circuit complexity and power. A patent application documents an invention and its claims; it is not, by itself, proof of manufacturing readiness or system-level superiority.

Some research designs reuse familiar fabrication techniques, but maintaining a third stable level can require extra threshold devices, voltage supplies, or circuit overhead. Results are highly dependent on the device technology, circuit family, and the operation being compared.

That nuance matters. A 2019 comparison found that the classic base-e argument overstates what can be inferred about physical hardware and that, for the arithmetic circuits it studied under the same technology assumptions, binary implementations outperformed ternary ones.

So the honest conclusion is more interesting than a victory lap: ternary can offer advantages in particular representations, interconnects, and low-precision workloads, while binary can retain decisive advantages in mature logic and memory. There is no evidence yet of a frictionless industry-wide transition.

The Path Forward: Evolution, Not Revolution

Binary computing deserves profound respect. It enabled the digital revolution, connected the world, and brought powerful computation to billions of people. The engineers who chose binary made exactly the right decision with the technology available to them.

But mathematics does not select a single optimal computer independent of physical constraints. Ternary remains compelling because it exposes the gap between an elegant information model and the messy realities of devices.

The path ahead may be selective rather than universal: specialized ternary accelerators, low-precision neural networks, memories, or mixed-radix systems could prove useful without replacing binary general-purpose computing.

The enduring value of ternary computing is not that a transition is inevitable. It is that revisiting first principles can reveal alternatives worth testing, measuring, and challenging.

The best computer is the one whose representation, devices, software, and workload fit together. Radix is one part of that system.


In the end, the story of ternary computing is not a proof that binary was a mistake. It is a reminder that elegant models create hypotheses; engineering evidence decides where they hold.

Sources and further reading