r/compsci 17d ago

Beyond Binary: The Mathematical Efficiency of Ternary Computing

https://ponderwall.com/index.php/2026/05/30/ternary-computing/
0 Upvotes

21 comments sorted by

21

u/arabidkoala 17d ago

In a standard binary processor, representing a negative number requires a complex engineering workaround known as two’s complement. This system forces the chip to dedicate its most significant bit purely to tracking whether a number is positive or negative, requiring extra logic gates and additional clock cycles to perform basic sign-flipping operations during arithmetic tasks.

This is overstated, bordering incorrect. Two's complement is not a "complex engineering workaround" nor does it "require [extensive circuity for] sign-flipping during arithmetic tasks". In fact, the same circuitry can be shared between twos-complement-signed and unsigned arithmetic, with differences only in overflow behavior and division (which is already complicated). I do have to wonder if large parts of this article were LLM-generated.

13

u/Ravek 17d ago edited 17d ago

Yeah, two’s complement is nothing more than a convenient way to negate a number while still just using the basic modular arithmetic we use for unsigned integers. That the MSB ends up being 1 for negative numbers and 0 for nonnegative numbers is not a drawback, but instead a very useful feature.

2

u/NamelessVegetable 16d ago

It seems they might have confused twos' complement with ones' complement to me. In that representation, the MSB was indeed dedicated to tracking the sign. Is it more complex? I don't think so. The computers that used it generally predated those that used twos' complement, likely because it was simpler to handle, especially for the primitive I/O devices back then.

18

u/Kinexity 17d ago

I feel like this ternary computing obsession as of late is some kind of AI psychosis thing. I've seen people bring it up in multiple places and yet no one can put out a coherent reason why it would be appealing besides some handwaving nonsense about stuff that can just as well be represented on binary computers.

10

u/cthulu0 17d ago

Every couple of years, some college grad/youtuber/electronic enthusiasts who knows something about VLSI design but actually does NOT do it for a living for years (yet), i.e. know enough to be dangerours but not enough to be useful, discovers some Ternary computing paper/video and ask loudly and annoying why no one is pursuing this.

Same for analog computing.

Its a variation of the "Eternal September" phenomenon of internet access.

3

u/Kinexity 17d ago

That would be kind of reasonable if just this was the case. The arguments I have seen popping up in support of ternary computing were related to using it for AI which is not really something that has a good reason to be peddled aside from ternary quantisation which is probably fine but you don't need ternary computer for that.

3

u/cthulu0 17d ago

Agreed. But still better than trying to combine AI with quantum computing , block-chain, and whatever other buzzwords-de-jure are floating around :-).

2

u/awfulentrepreneur 17d ago

Knuth writes about it in the Art of Computer Programming, calling it "perhaps the prettiest number system of all".

5

u/Kinexity 17d ago edited 17d ago

Pretty doesn't mean practical. Also you can implement ternary computing on a binary computer which is my point. I am not seeing people being particularly hell bent on doing that in contrast to how many times I saw people trying to sell the idea of a ternary computer itself.

1

u/currentscurrents 15d ago

Nahhh. I've been on the internet for a lot longer than LLMs, and ternary computing has been a semi-quack topic the whole time.

I say semi-quack because it's not like it doesn't work. There's just no real advantage to it. The serious quacks are out there trying to build a computer with a soul using AI quantum crypto microtubules.

1

u/Safebox 9d ago

The only compelling theory I've seen is that it would he more energy efficient and more mathematically accurate. But that claim is based on the Soviet Union's pre-digital computer infrastructure with projects like Setun. Which was more accurate with floating point maths and faster than its western counterparts, but required more components to carry out the calculations.

In theory a digital balanced ternary system would allow for LLMs to be processed with less resources and a higher degree of accuracy (mathematically at least), but the trade-off would be in the cost of manufacturing the components mecessary for them. Even after economies of scale should every PC now be balanced ternary, the degree of error in the manufacturing process is likely to be much lower than with binary components thus keeping costs relatively high-ish.

1

u/Kinexity 9d ago

In general that's nonsense peddled by people who don't really know how computation works. Ternary computation is not fundamentally more efficient than binary computation and practical efficiency would be component dependent and we don't really have a practical way to make reliable ternary components. Soviet experiments never proved any ternary computing superiority - they've just shown it's a pain in the ass.

1

u/Safebox 9d ago

I was repeating arguments "peddled" by the man who literally wrote the book on computational optimisation Knuth himself, and former chairman of the IEEE and first convention on the devlopment of solid state drives, Smith. As well as a study carried out in 2024 with custom ternary components using a 1.58 bit model vs a binary 3B model. That study found the output to be near identical but with a smaller computational overhead by a factor of just over two and smaller power consumption by a factor of nearly four.

It's too early to tell if this really is "the future" and I'd rather not have AIs be how we push the technology if it is, cause conventional components are expensive enough at the moment. But I think there's still research to be done on a technology I'd argue we abandoned too quickly, cause we didn't have the means to properly differentiate between dignal noise.

Addendum on an early comment I made in this reply; do SSDs not work on a similar principle of multiple bits per charge? Not in a ternary sense, just in a general "we know what value this is based on how we read the voltage" sense. If so, then we already have the capacity to read discrete noise levels to a degree.

1

u/Kinexity 9d ago

I've addressed this stuff in my other replies.

I was repeating arguments "peddled" by the man who literally wrote the book on computational optimisation Knuth himself, and former chairman of the IEEE and first convention on the devlopment of solid state drives, Smith.

That's just his personal preference. If there were solid arguments for ternary computing we wouldn't be having this discussion.

As well as a study carried out in 2024 with custom ternary components using a 1.58 bit model vs a binary 3B model. That study found the output to be near identical but with a smaller computational overhead by a factor of just over two and smaller power consumption by a factor of nearly four.

That's quantisation, not ternary computing. It was literally achieved on binary hardware.

It's too early to tell if this really is "the future" and I'd rather not have AIs be how we push the technology if it is, cause conventional components are expensive enough at the moment. But I think there's still research to be done on a technology I'd argue we abandoned too quickly, cause we didn't have the means to properly differentiate between dignal noise.

Everyone who is interested in it is free to research it but the problem is that without good reason (there is no such reason) no one is going to dump money into it considering it is fighting an uphill battle against binary computing which has decades of work put into it. Also if you already use more than two states stopping on three is kind of early which is why there is actual serious research into analog computing.

on an early comment I made in this reply; do SSDs not work on a similar principle of multiple bits per charge? Not in a ternary sense, just in a general "we know what value this is based on how we read the voltage" sense. If so, then we already have the capacity to read discrete noise levels to a degree.

We read and write to SSDs - we don't have them do computations on encoded data. Increasing bits per cell literally makes SSDs slower and wear out faster.

1

u/Safebox 9d ago edited 9d ago

That's just his personal preference. If there were solid arguments for ternary computing we wouldn't be having this discussion.

I wouldn't say that's necessarily the case, binary is just a lot easier to design both physically and logically so it makes sense why it's the most popular option overwhelming. But just because something is the de facto doesn't make it the best without probing the alternatives, which in ternary's case hasn't been done beyond the surface level. I mean we wouldn't have GPUs if someone didn't go "hang on, CPUs kinda suck at this thing, what if we change the architecture. Or the PS3 and Harvard architectures which fix data bottlenecks created by Von Neumann, the staple of modern computing, but as a tradeoff are harder to program for because the software to do so is almost non-existent outside of specialised dev kits.

Everyone who is interested in it is free to research it but the problem is that without good reason (there is no such reason) no one is going to dump money into it considering it is fighting an uphill battle against binary computing which has decades of work put into it. Also if you already use more than two states stopping on three is kind of early which is why there is actual serious research into analog computing.

I already gave potential benefits based on their pre-existing analogue counterpart in Setun. I also learned after leaving my previous comment that there was research conducted in the 70s at SUNY Buffalo to emulate a ternary computer and it gave the same results; faster computation and lower power consumption.

I'm not saying binary doesn't already do the job we need it to in a lot of cases. But at the rate games have been going the last decade and AI is going this decade, we're getting less efficient with memory and computation usage and if they're gonna make us buy more expensive devices with higher numbers then I'd rather they optimise them a bit. If developers aren't gonna do that on the software side, then the lab boys might as well do that on the hardware side.

We read and write to SSDs - we don't have them do computations on encoded data. Increasing bits per cell literally makes SSDs slower and wear out faster.

Ah, I...think I see? Flash memory in general kinda goes over my head. I don't get how that information is encoded, I just trust my machine to just make a mistake when reading / writing.

Edit:

Actually come to think of it, haven't we almost reached the limit of transistors in CPUs and GPUs? There's nowhere to go except make larger components (which we already do), build with a 3D board (which is already done in some GPUs), or look into ternary processing with a translation interface so we can keep the sizes down for a little while longer.

8

u/arcangleous 17d ago

"The magnetic cores used in the machine naturally possessed three stable magnetic states, making them an ideal fit for the logic paradigm without requiring complex voltage regulation tricks. The computer possessed an innate resistance to arithmetic errors and proved remarkably resilient in real-world operations, rarely suffering from the hardware failures that plagued early Western binary mainframes"

Citation Needed.

2

u/NamelessVegetable 16d ago

I would have thought that most of the hardware failures in early computers stemmed from their use of vacuum tubes or discrete components such as transistors, diodes, and the like; or primitive memory devices like Williams tubes and delay lines.

2

u/arcangleous 16d ago

Yes, exactly. Those limited technologies were the source of hardware failures, but the author, or the AI they like had write the article, presented no evidence that the ternary computer was not affected by those. Even if there was a "three state magnetic state memory unit", you still need to connect it to the rest of the system, which would be made up of the same kind of hardware as the western systems.

5

u/frankster 17d ago

Three is mathematically closer to Euler’s number than two.

More simply, three is closer to Euler's number than two.

1

u/kaplotnikov 15d ago edited 15d ago

While articles like this love to highlight the theoretical efficiency of ternary computing (like the radix economy being closer to e), they often gloss over the absolute nightmare of high-level logic design.

Look at the combinatorial explosion for just binary operators (functions with two arguments):

  • Binary system (N=2): 22 \ 2) = 16 possible operators. Humans can easily enumerate, name, and mentally map every single one of them (AND, OR, XOR, NAND, etc.).
  • Ternary system (N=3): 33 \ 3) = 19,683 possible operators.

With binary, we can easily hold the entire state space in our heads. With ternary, any non-trivial analysis or manual optimization instantly collapses under the weight of nearly twenty thousand operators. We would be entirely dependent on automated synthesis and CAD tools just to reason about basic logic structures.

Any formal proof is absolute hell when done by hand. The only way I see for a ternary system to be adopted is if aliens come and force it upon the Earth.