How Base 3 Computing Beats Binary
Source:https://www.quantamagazine.org/how-base-3-computing-beats-binary-20240809/#comments How Base 3 Computing Beats Binary 2024-08-12 21:58:04

The hallmark feature of ternary notation is that it’s ruthlessly efficient. With two binary bits, you can represent four numbers. Two “trits” — each with three different states — allow you to represent nine different numbers. A number that requires 42 bits would need only 27 trits.

If a three-state system is so efficient, you might imagine that a four-state or five-state system would be even more so. But the more digits you require, the more space you’ll need. It turns out that ternary is the most economical of all possible integer bases for representing big numbers.

To see why, consider an important metric that tallies up how much room a system will need to store data. You start with the base of the number system, which is called the radix, and multiply it by the number of digits needed to represent some large number in that radix. For example, the number 100,000 in base 10 requires six digits. Its “radix economy” is therefore 10 × 6 = 60. In base 2, the same number requires 17 digits, so its radix economy is 2 × 17 = 34. And in base 3, it requires 11 digits, so its radix economy is 3 × 11 = 33. For large numbers, base 3 has a lower radix economy than any other integer base. (Surprisingly, if you allow a base to be any real number, and not just an integer, then the most efficient computational base is the irrational number e.)

In addition to its numerical efficiency, base 3 offers computational advantages. It suggests a way to reduce the number of queries needed to answer questions with more than two possible answers. A binary logic system can only answer “yes” or “no.” So if you’re comparing two numbers, x and y, to find out which is larger, you might first ask the computer “Is x less than y?” If the answer is no, you need a second query: “Is x equal to y?” If the answer is yes, then they’re equal; if the answer is no, then y is less than x.

A system using ternary logic can give one of three answers. Because of this, it requires only one query: “Is x less than, equal to, or greater than y?”

Despite its natural advantages, base 3 computing never took off, even though many mathematicians marveled at its efficiency. In 1840, an English printer, inventor, banker and self-taught mathematician named Thomas Fowler invented a ternary computing machine to calculate weighted values of taxes and interest. “After that, very little was done for years,” said Bertrand Cambou, an applied physicist at Northern Arizona University.

In 1950, at the dawn of the digital age, a book-length report on the computing technology of the time suggested a computing advantage for ternary. And in the fall of 1958, visitors to the Soviet Union reported that engineers there had been developing a ternary computer called Setun — the first modern computer based on ternary logic and hardware. Soviet scientists built dozens of Setun computers.

Why didn’t ternary computing catch on? The primary reason was convention. Even though Soviet scientists were building ternary devices, the rest of the world focused on developing hardware and software based on switching circuits — the foundation of binary computing. Binary was easier to implement.

But the past few years have brought flashes of progress. Engineers have proposed ways to build ternary logical systems even on binary-based hardware. And Cambou, with the support of the U.S. military, has been developing cybersecurity systems that use base 3 computing. In papers published in 2018 and 2019, he and his collaborators rigorously described a ternary-based system that could replace the existing public key infrastructure, which includes the digital keys needed to encrypt or decrypt cybercommunications. Switching from bits to trits, he said, significantly reduces the error rate, because ternary states better manage erratic information.

Schoolhouse Rock! turned out to be prophetic. “The past and the present and the future,” the cartoon characters sang. “You get three as a magic number.”

Uncategorized Source:https://www.quantamagazine.org/how-base-3-computing-beats-binary-20240809/#comments

Leave a Reply

Your email address will not be published. Required fields are marked *