| 01 Aug 2026 | Jimmy Ostler | Word Count: 2481 | Reading Time: 13 Min |
In computing, it is natural to use binary to represent numbers, since simple logic gates that either
block or allow the flow of electrons is equivalent to boolean logic. This choice is not arbitrary, but
it is not the only one. Electronic and logical circuits approximate boolean logic, but the physical
underlying system is analog. Nature deals with the discrete in the quantum realm, and we live in the
macro realm. This means we can simply choose to implement logic using 3 value levels. This kind of
logic is called three-value logic, with Kleene
logic being the most popular. We can also base this off of arithmetic: with 3 value levels, we would
use a base-3 system, ternary (sometimes called trinary, though ternary seems to have won).
Base 3 is unique in some interesting ways. One is that it lends naturally to a "balanced" numeric system, where our digits do not start with 0, but surround it, including an equal number of negative and positive numbers.
We can do this with any base, but only odd bases are balanced around 0. We can, in fact, pick any integer in (-n, n) to balance our base around, and we still get a valid, rational, system. Picking n/2 results in what we usually think of as "base n".
We willfully elect to ignore the possibility of choosing numbers outside of that range.
Additionally, base 3 does in fact "win" the radix economy for integers.
This gives it an extremely useful property for computing: density. This property, as well
as its practical size (useful for representing many things, such as equivalence!), make it well
suited for certain specialized cases. This includes search trees
and perhaps huffman trees (outdated and perhaps embarrassing code).
I encountered a somewhat better compression ratio testing these, and any similar systems are
similarly easily represented.
There remain downsides, such as having to relearn bit/trit manipulation tricks, as well as some bit manipulation tricks being no longer possible. That being said, there are still ways to accomplish many of the same things, as well as engage in the process of discovering and learning new things! I think this is a net positive.
The digits being used present some problem. 0, 1, and -1 look strange when combined into a word of digits: "-110-11010-1" (this does not strike joy in me). I use T to represent -1 in all of my work. I believe this notation to be simple and understandable, as well as easily typed.
Additionally, I present my solution for a potential "hexadecimal for ternary" with
septivigntimal. The gist is that the letters A-Z and 0 line up
perfectly with the number of 3-digits balanced ternary numbers, making it an ideal and practical
way to represent balanced ternary numbers.
There also exists precedent for this. The USSR created a balanced ternary machine using
rotating magnetic drum technology. This was called the Setun,
and you can read about it there. It's hard to sift through certain claims, such as
being simpler and less expensive than binary computers (was that really because
of the numerical representation of numbers?), but there was something about these
computers that people liked.
In the US there wasn't really a similar situation. Binary seems to have been the predominant and prevailing technology in the US, but somewhat later there was an effort to implement a ternary computer not using ternary hardware, but emulated in binary microcode (really cool alert). The way operations were performed is specified in a paper1, which is how I (currently, though there are better ways, which I'll add as Rust features to my crate at some point) represent balanced ternary in my code.
Donald Knuth is commonly cited as saying "Perhaps the prettiest number system of all is the balanced ternary notation"2. I tend to agree, since the natural representation of negative numbers, along with the use of very few, simple algorithms for arithmetic is really neat. Additionally, it contains only units and 0, making this and binary essentially the only integer number systems not beholden to requiring a representation of a prime or composite number. This is more of a fun fact, though it's possible that some useful properties arise from this.
Bryan Hayes wrote an article about it before I was born3. It highlights many useful non-computational aspects as well.
There exists a whole Ternary Manifesto4 highlighting the benefits, representations, and variations of BCT. A significant portion of my work is disagreeing with parts of this document and trying to do what I think works better, but it is an amazing resource and a great start.
I want to talk about concrete benefits about adopting a new form of computing. Is this the ultimate potential Second System Syndrome5? Or Not Invented Here Syndrome6? Or XKCD 9277? Isn't that... bad? Well, there could absolutely be bad aspects to it. But I hesitate to say it's "bad". It's a chance to build out a new, improved, and open base for all computing. And I'm worried that if we don't make it happen that specific way, it will happen anyway, and we will spend decades trying to reclaim progress.
I want you, the reader, to imagine what could be done differently if we could create a new way of doing modern computing from scratch. There are things that wouldn't be changed! I highly doubt the world would want to pull up all the existing infrastructure that uses binary, and that would be an absolutely absurd expectation. I do not expect nor want this. Instead, Binary-Ternary information interchanges exist, and are even used in technology you use today. GDDR7 uses PAM38, which sends data in graphics cards around using 3 signal levels because of information density. Sending data to and from computers of different radix is essentially already a solved problem.
Binary will not go away. But if Ternary has any benefit, the arms race of silicon and capitalism will eventually gravitate towards it, especially as we currently reach diminishing returns on making CPUs faster. Wouldn't you rather it start with an open ecosystem, a focus on security, and looking towards the future? We could start the foundation of ternary computing on something akin to RISC-V. Personally, I like the sound of that.
One area where ternary computing could almost certainly be better is scientific computing. Truncation of balanced ternary is always rounding. Floating point is simpler. It's simply a better fit for the use case of signed noninteger numbers, without ambiguity. It could also be an opportunity to popularize a new, perhaps better system of noninteger numbers9, benefitting everybody with minimal extra effort.
Quantum Ternary is also a proposed way of doing ternary, though since quantum computing is fundamentally different from classical computing, which ternary still is, that is not my domain to talk about as much as it would be other people's. It is likely that it is just as reasonable as quantum binary though, and we simply went with binary for quantum since it's what we already do.
Since things are still new, there's a lot that needs to be tested, discovered, and created. One of these variations that binary grew out of a long time ago is the size of the minimal addressable unit. A byte being 8 bits is entirely uncontroversial except in some extreme outliers. However, this is not solved in ternary. I have used 9 trit "trytes" in my VMs so far, but historically 6 has also been a chosen option, giving 729 unique representations. 9 trits is quite large compared to 8 bits, since 9 trits contains 19683 unique representations (slightly more than 256).
So... why 9. Well, the astute will recognize 9 as a power of 3. Same with my word size, 27. Binary famously uses powers of 2 for essentially everything, since it's a fairly useful property to have everything sized in such a way. However, with base 3, these sizes are pretty far apart, with too few intermediary sizes (unlike binary), that they're somewhat impractical compared to those used to binary. This could be entirely a non-issue. But it also might not be, and it's something that can and will determine how the short-term future of these computers goes.
6 seems to be the only serious competitor. It uses exactly 2 tribbles10, can easily be used
to create words of size 24 or 4811, and divides by 2 and 3, which is a property some people
find desirable12. To put it differently, powers of 2 are cool, and powers of three give
people weird, icky vibes. It's hard to say how much it really matters right now though. I've
grown to quite like powers of 3, and I don't see any massive downside besides it being somewhat
different from what we've grown used to. The biggest implications would simply be for
terscii, but perhaps there's unrealized benefits to a much larger range
of possibilities for single-character encodings. This would eventually need to lead to a standard.
We would need an unsigned representation, ideally one that doesn't conflict with our usual
way of doing ternary operations. Luckily, since balanced ternary is simply a biased system,
we can switch out T for 0, 0 for 1, and 1 for 2, and everything kinda... just works, with respect
to machine code operations. Mostly. I have said more about this, including the problems,
in septivigntimal.
This is the real question. There exist people doing this as a hobby, as well as some semi-serious efforts, but the most concrete push towards its existence that I've observed has simply been Huawei's patent, which, although some claims that a physical chip has been made circulate, seem entirely unrealized.
There does exist research into this topic! This includes research into ternary logic gates using CNTFET technology13, logic, and some about Quantum ternary. Despite all that, to my knowledge, nobody has built a physical ternary logic gate using CMOS logic or any kind of practical-at-scale technology, even as a demo. I could have missed it! There are a few ambiguous cases. But the point remains the same: a lot of people talk about it, very few people do it, because it is actually hard!
To make it happen, there needs to be a public leader (organization or person), an open repository of information available to be freely used, and an ecosystem that people get excited to participate in! Nobody wants to "try out" my ternary VM that doesn't even have an assembler. But plenty of people would try out a web demo of a C compiler14 that runs the compiled program on a ternary VM. More so if those programs do interesting things - have GUIs, scientific computation, showcase the benefits of balanced ternary arithmetic, maybe even interface with binary computers! None of this needs ternary hardware (yet)! And it shouldn't. There should be a reason to build ternary hardware a specific way, and those reasons and specific ways need to be discovered.
Ternary computers will not gain a foothold in the imminent technological landscape just because it has marginal (if any!) gains over binary. Even if we could fabricate a 2nm or 18A or whatever ternary chip, nobody would care for it as anything other than an oddity. The money spent to design modern chips needs a return on investment, and there is no market. There are few windows for get ternary a foothold. It would need to be marketed well. It would need an active ecosystem, it would need customers, it would need a metric shitton of funding (over time, and this would actually probably be the easy part), and it would need time. But I am convinced it is possible. Call it delusion. Naivety. You are probably correct. Nevertheless, it is definitely not possible without someone trying.
I mentioned footholds. I believe there are a few.
These are all important for different reasons. Some for funding, some for attention, some for an actual technological foothold. They're small, but they do exist. And if we want ternary computing to exist - whether it be because it's novel, faster, or a chance to build a new, more secure foundation for future computing - it is imperative that we step up.
Frieder and Luk, 1975 ↩
The Art of Computer Programming, Vol 2, Donald Knuth. ↩
The Third Base, Bryan Hayes ↩
The Ternary Manifesto, Douglas Jones ↩
The Mythical Man Month, Fred Brooks. ↩
Posits. Let's be real, benefitting everybody with minimal extra effort. If we don't have to continue using traditional binary floating point, should we? ↩
These numbers reult in address ranges and data storage option ≈ equivalent to that of (slightly more than) 32 and 64 bit binary computers. Picking powers of 3 results in computers somewhat larger than this, with a 27 trit computer with 9 trit trytes being closer to a binary 64 bit computer. ↩
Base 6. I happen to align more with this, ironically enough. ↩
I believe that having a C compiler is both inevitable and important. I do not think we should use C to build out the open foundation for ternary computing if we do not have to. Some form of borrow checked language or a fork of rustc (custom backend...? is that a stretch (yes))) single-would be ideal. ↩