How Base 3 Computing Beats Binary
Long explored but infrequently embraced, base 3 computing may yet find a home in cybersecurity.
Three, as Schoolhouse Rock!(opens a new tab) told children of the 1970s, is a magic number. Three little pigs; three beds, bowls and bears for Goldilocks; three Star Wars trilogies. You need at least three legs for a stool to stand on its own, and at least three points to define a triangle.
The number 3 also suggests a different way of counting. Our familiar base 10 decimal system uses the 10 digits from zero to 9. Binary, our digital lingua franca, represents numbers using only the two digits zero and 1.
But mathematicians have long explored counting in threes. Consider, for example, base 3, or ternary, which uses three digits. The standard convention is to use the digits zero, 1 and 2.Share this article(opens a new tab)
Newsletter
Get Quanta Magazine delivered to your inboxSubscribe nowRecent newsletters(opens a new tab)

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.