# The ternary calculating machine of Thomas FowlerMay 28, 2012 6:17 AM   Subscribe

When I was a kid, my mother worked at the local bank, she was the supervisor of the accounting department. Frequently she would have to work evenings or weekends, and, as a single parent, she would drag me along, buy me a bottle of coke in the employee lunch room, and plop me at the nearest desk and fire up a mechanical calculator for me. It was like magic, I went through rolls of paper but it was cheaper than a baby sitter.

I decided at that moment that there was absolutely no reason to learn the multiplication tables or long division.
posted by HuronBob at 6:27 AM on May 28, 2012 [1 favorite]

Oh, man. I think my dad (a CPA) had one of those rotary calculators. I thought it was the coolest thing ever.
posted by rmd1023 at 6:30 AM on May 28, 2012

Don't forget the Curta.
posted by (Arsenio) Hall and (Warren) Oates at 6:30 AM on May 28, 2012 [1 favorite]

"The only modern, electronic ternary computer Setun was built in the late 1950s in the Soviet Union at the Moscow State University by Nikolay Brusentsov, and it had notable advantages over the binary computers which eventually replaced it (such as lower electricity consumption and lower production cost)"

from Wikipedia
posted by egor83 at 7:03 AM on May 28, 2012

Even after reading the description, I have no idea what balanced ternary is, but this is still impressive. I am reading Gibson and Sterling's The Difference Engine now, so my head is full of ideas of what may have happened had the computing age kicked off a century early.
posted by polywomp at 7:50 AM on May 28, 2012

Shit, my boss still uses a rotary calculator to add fractions when checking dimensions on architectural drawings. I wish I were kidding.
posted by notsnot at 8:03 AM on May 28, 2012

``` Even after reading the description, I have no idea what balanced ternary is - polywomp```

It looks like it's just another way to say signed ternary.
posted by xorry at 9:16 AM on May 28, 2012

Balanced ternary is where every digit is -1, 0, or 1.

To handle negative numbers in binary you need to reserve one digit for the sign and remember to take the complement. And remember that zero is positive. It, uh, results in a lot of off-by-1 errors.

Balanced ternary doesn't have that problem.

In binary, when you make a number too large, you end up flipping the bit that sets numbers to negative.

In balanced ternary, there's no sign bit to set. You'll still end up with bad results when your number gets too large to handle, but the excess bits... uh, trits?... will just get thrown away, so your bad results will still have the right sign, at least. I think, if you give the number more bits to fit in, you can just tack a 1 on the beginning and get the right answer after an overflow.

Not having to take the complement of a number when you want to subtract it from something might have given a performance advantage in the late 1950s.
posted by LogicalDash at 10:00 AM on May 28, 2012 [1 favorite]

> Shit, my boss still uses a rotary calculator to add fractions when checking dimensions on architectural drawings. I wish I were kidding.

My dad, also an architect, had a big Marchant rotary calculator for the same purpose. It made a noise like an International Harvester harvesting rocks. I was very fond of it because it would divide by zero. Or try, anyway. Enter a calculation involving a zero denominator and hit the go button and it would sit there and spin all afternoon, trying, until you had mercy on it and cancelled. (Am very fond of it; still have it--it sits next to the Apple II--and it still works. I fire it up occasionally and divide something by zero just to see if the laws of the universe have changed.)
posted by jfuller at 10:24 AM on May 28, 2012 [4 favorites]

For a good introduction on ternary based arithmetic, I like Brian Hayes' article Third Base.
posted by wobh at 12:33 PM on May 28, 2012 [1 favorite]

Balanced ternary is neat, but base -2 also allows negative numbers, with only two states instead of three. If it wasn't for compatibility issues this is probably what CPUs would be using. It would be ideal for modern programming languages, which have been moving away from unsigned types - they are almost nonexistent in Java and discouraged in C#.

Even cooler, base (i - 1) allows you to represent all complex numbers in a simple binary system. If I ever make a CPU, that's what I'll be using.
posted by foobaz at 7:16 PM on May 28, 2012

« Older For your information this video is on its way to...   |   The Public Image Ltd. riot show Newer »