There Are 10 Kinds Of Computers In The World

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.

50 thoughts on “There Are 10 Kinds Of Computers In The World

  1. 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

    1. 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.

    2. 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?

      1. 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.

          1. 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.

          2. 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

          3. @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.

          4. 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.

        1. 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.

  2. 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.
    ;-)

  3. 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.

  4. “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.

      1. “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.

  5. (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!

  6. “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?

    1. 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.

Leave a Reply to James AnalyticCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.