There’s an old joke that there are 10 kinds of people in the world. Those who know binary, those who don’t, and those who didn’t see a base three joke coming. Perhaps [Dmitry Sokolov] heard that joke because he’s built a ternary (base 3) computer. He claims it is the first one to be built in the last 50 years. You can see a video about the device below. There’s also a video of the device with a nixie tube output.

You may not think of it often, but *bit* is a contraction of binary digit, so a ternary computer doesn’t have those. It has trits. The CPU operates on 3 trit words and uses nothing but multiplexers as building blocks. Instructions use 5 trits, some of which are a two-trit opcode and a 3 trit address of one of the 13 registers. The allure of using ternary, by the way, is that you can represent more numbers in fewer bits — um, trits, rather.

That might seem like an odd number of registers, but using balanced ternary, a 3 trit word can represent numbers from -13 to 13, so it makes sense. Instead of a bit’s 1 and 0 state, a balanced trit has -1, 0, and 1 states. To prevent confusion, [Dmitry] uses the notation N,0, and P when talking about a ternary word. For example, 101 is 10 decimal or P0P in his notation. To represent -10, you simply use NoN, instead.

The multiplexers use an analog switch, the DG403. We’ve talked before about making logic gates out of muxes, but — of course — those were the binary kind. However, we aren’t too sure this is really the first of its kind in 50 years since we remember a Hackaday Prize entry that was similar. In fact, the designer gave a talk about her CPU at last year’s Hackaday Superconference. Still, this is an impressive piece of work.

The Russians did a lot of work in this area back in the 1950s. If you can read a little Russian, you can always go try their emulator online.

You know that originally a trinary unit was going to be called a ‘tit’, but it was deemed to be politically incorrect, even back then.

Is the same era that defined the unit of computing power as “kilo girls”?

As well they should, considering at the time a “computer” was someone who computes for a living, and women proved to be more meticulous and less mistake prone.

In Latin didn’t they used to say they were more efficient and safer “computa’s”

2 megatit per second download speed

Measuring the internet in tits is probably the most accurate way.

Indeed!

Would someone care to make the computer in this project render /balanced/ ternary?

You can represent balanced ternary (where each trit has the states -1, 0, +1) thusly:

b is +1

o is 0

p is -1

bop is the representation of 8, giving the name “bop notation” to this scheme of display.

pob is the representation of -8, illustrating negation by rotation about the horizontal axis.

Addition:

+ b o p

b bp b o

o b o p

p o p pb

Multiplication:

* b o p

b b o p

o o o o

p p o b

More… I see that [Dmitry Sokolov] is already showing balanced ternary. Missed that in my haste. My scheme, however, allows the negation by rotation.

Also… the addition and multiplication tables I showed originally had spaces that arranged them neatly, but WordPress decided that extra spaces are superfluous.

Correction to correction contains error. teds10percent is who WordPress thinks I am if I don’t give my name.

Rookie question – since binary data is kept on media as the presence or absence of *something* (magnetic charge, pit in a CD disk etc.) how are ternary physical media handled?

Possibly on, off and in-between. With traditional optical that might be a bit difficult, maybe come up with a system that takes advantage of polarization, magnetic you could use field strength.

Change in something (intensity) range?

Oh, wait… polarity… duh… wouldn’t there be a negative, zero or positive charge method?

This can be done with electric charge, but is much more difficult with magnetism. Getting a charged domain down to zero involves repeatedly changing the magnetic flux through it and diminishing it slowly. There are “degaussing” tools to do this with things like screwdrivers, but on a hard disc I think it would be too slow.

I wonder how can be done faster?

Material(s) that don’t hold the magnetic polarity as easy?

Then I’m guessing feasibility of abundance and manufacturing of the material and system.

Curie Point’s can be utilized, though operating temperatures have to be higher and some sort of reversal of the material magnetic polarity if not micro/nano/pico electromagnetic.

HHhmmm… is definitely more complex and challenging to micronize.

https://sciencing.com/change-polarity-magnet-7282085.html

http://www.feynmanlectures.caltech.edu/II_37.html

@Stephen: it wouldn’t be a problem today to convert ternary to binary and back when saving data to magnetic media, however magnetic core RAM (well, non-volatile RAM, that is) was all the rage, relatively cheap and abundant, back then when computing was young and still could significantly change.

It would had probably been too slow to convert ternary to binary and back on each RAM memory cycle. So basically, a technological issue and resulting architectural decision at the dawn of computing era carved choice of binary coding in stone.

Sure, another translation process with software versus direct hardware process.

Can there be an efficient way with say something like 3D printing first vision… then taking away the mechanical aspect and replacing with micro LED lasers basically where instead there can be an array of magnetometer detectors and polarity changing emitters that would change the properties versus say a spindle. The LED or other micro form of lasers would rapidly heat, polarity changing emitters change polarity or negate magnetic intensity of -1 or 1 tolerance? Then just make smaller to a nano or pico scale.

You use yoghurt. Left-handed yoghurt for -1, right-handed yoghurt for +1, no yoghurt for 0.

Just gotta find out how to keep about every life-form around from eating it.

Just don’t add flavor or sweeteners!

Full square wave. They have both positive and negative components.

Isn’t “digital media” actually binary-encoded analog media?

Something measured results in a high/low voltage, which has a spec for declaring logical high or logical low…

By popular definition, I suppose that would be correct. I believe it is only accurate because of the prevalence of binary quantization systems in use in digital storage today. Considering the etymology though, digitus (Latin) meaning finger or toe, referring in this case (IMHO) to their utility as counting instruments, limiting the use to only binary values or even decimal or vigesimal values would be erroneous. With this in mind, my interpretation of “digital media” is synonymous with “storage apparatus for recorded quantized values representing discrete information or approximating measured, predicted, or generated analogs of non-discrete information or phenomena.”

Intellectual fluff aside though, I’ve always thought of “digital” as meaning the encoding of information in discrete units, regardless of what those units may be.

There must be an optimal system in terms of hardware required. I’m not sure whether it would be binary, ternary, or something else.

The optimal one must be of base e, which is closer to 3 than to 2, therefore base 3 is slightly more optimal.

Thats optimal in mathematical sense of course. In real hardware it will be different.

In electronics, a multi-level cell (MLC) is very common in memory systems like low-end flash drives.

Note, base-2 (Binary) was historically chosen predominantly due to basic math operations being simpler to implement.

I used to wonder if Mathematica’s virtual base-10 engine would end up an ASIC someday, but then I learned how a base-2 system already takes billions of transistors to work in general computing. =)

I think the designer may be happier working with a qubit based quantum-state machine someplace.

;-)

There was another “kind” of computer which I used in one of my early college EE courses — the analog computer. Unlike digital computers, It was great for doing integro-differential equations and helped to understand control systems theory. Ours used original Burr-Brown hybrid “operational amplifiers” that became the inspiration for op amp ICs once IC technology took off. Even though microprocessors were around, they were still too new and very expensive. By the time I graduated, the EE department had several IMSAI 8080 computers (https://www.imsai.net/). They weren’t called PCs yet.

My favorite was the hydraulic computer that Bill Phillips cooked up….

https://en.wikipedia.org/wiki/MONIAC

Excuse me. 10 is outdated. Now |10> rules.

Yes, there were a couple of projects on hackaday with attempts to build a ternary computer:

https://hackaday.io/project/1043-base-3-ternary-computer-from-scratch

https://web.archive.org/web/20161231112748/https://hackaday.io/project/6284-tern-ternary-logic-circuits

However as far as I know, no working device in the result. While TRIADOR is not fully completed, however it is already working.

“He claims it is the first one to be built in the last 50 years.” That isn’t a small claim, especially since building trinary computing systems isn’t something new. Especially if we think back to the 80’s and 70’s and the many companies that sprung up in the electronics industry, many of these were not too afraid of making something new and different. I haven’t looked too deeply, but I would be surprised if there haven’t been a trinary microprocessor on the market back then. Especially if we consider how relatively easy it is to build multilevel logic.

Secondly, I don’t get the point of saying trit, as last time I checked it were still the smallest bit of data represented in memory.

I looked for any actual ternary implementation and have found no computing machine. Lots of individual logic gates, adders, patents and stuff, but no traces of an actual computing machine since Setun.

Well, then we are two to actually look a bit, I haven’t found anything of note either.

I experimented with logic in both base 3 and 5 a few years back, but not really a whole “computer” though.

BInary digiT

TRInary digiT

As hinted above tit wasn’t used by choice. Not because of political correctness of course.

“The word bit was invented in the latter half of the 1940s by John W. Tukey (1915-2000), an eminent statistician, while working at Bell Labs (the research arm of AT&T, the former U.S. telecommunications monopoly). He coined it as a contraction of the term binary digit and as a handier alternative to bigit or binit. Tukey also coined the word software.”

It is not said if the contraction is from “BInary digiT” or “Binary digIT”. I prefer the latter interpretation as an “it” is a thing. Therefore, my earlier statement holds, at least until you can prove the the former interpretation is what he intended. Given that he died on July 26, 2000, you may find it difficult to ask him.

So, in other words, Tukey was not Y2K compatible.

B^)

That is the Tukey of FFT fame, the algorithm that makes Fourier Transforms fast enough to do things like SDR and tons of other stuff today.

Cool. How about ternary DACs?

https://www.edn.com/electronics-blogs/benchtalk/4458904/Ternary-DAC–Greater-resolution–less-bits

Check the project logs ;)

https://hackaday.io/project/28579-homebrew-ternary-computer/log/71721-balanced-ternary-dac

(I’m really sorry to be pedantic, but when you combine two (or more) words into one word, and the resulting word takes its meaning from the original two (or more) words, it’s called a portmanteau.)

It’s interesting that binary has become almost second-nature, but ternary seems so strange!

“it’s called a portmanteau”

A French word for a common practice in Deutsch!

B^)

I vote for trinary. I can’t get used to tercycle and terangle.

“those who didn’t see a base three joke coming” i am writing to thank you for this gem

https://en.wikipedia.org/wiki/Mathematical_joke

“I wonder how can be done faster?”

Ironically, wthh a slower harddrive.

Then BInary digIT ought to ba a BIIT, pronounced, bite.

If not, then tit.

And noone in science would even think of a sexual reference for hours or days.

Otherwise, BIT is obviously a referent ot Breast cuz there are often Two.

But then as Casper is white and rabbits are prodigious, I had spook and bunny wrong for decades.

Anyway, then 100 is -1? How do I do a sq rt of that?

Convert to base10, get 10… convert back…

Sq Rt of 100 is… lessee…010 is… -1, 0, +1… 0?

Let me see it i get it right: p=+1, o=0, n=-1, therefore a single digit trit goes from -1 to +1, not enough digits.

Add one trit and we get

nn = (-1)*3+(-1) = -4

no = -3 + 0 = -3

np = -3 + 1 = -2

on = 0 – 1 = -1

oo = 0 + 0 = 0

op = 0 +1 = 1

pn = 3 -1 = 2

po = 3 + 0 = 3

pp = 3 + 1 = 4

Therefore, sqrt(4)[base 10] = sqrt(pp)[base 3] = pn[base 3] = 2 [base 10]

In a “classic” base 3, using 2 digits, we’ll get all values from 00 to 22, which in base 10 is from 0 to 8.

Same reason they changed “Uranus” to Urectum”.

I was wondering why the signals changed focus. Not so superficial.