The Daily Rant
6/25/07

Three Is The Loneliest Number

or

If Guilt Had A Color, It Would Be Mauve

Forgive me, readers, for I have sinned been busy. I has been 13 months and 10 days since my last confession rant.

It has been a busy year for me. Busy is good - busy keeps Jim from going crazy. My no-longer-quite-so-new job is still going very well, and frankly, I generally would rather work than play the first person shooter games that I used to spend so much time on. Then again, Allison and I have a Wii and a pair of Nintendo DSes to distract ourselves with now as well. The Wii is as close as I get to exercise, so, to paraphrase the Bowflex® guy, "I'm 45, and I'm in the best shape of my life." If you could see me you'd know how sad that really is.

Enough personal stuff. Onto the main topic, which I have decided will be an incredibly too brief introduction to the idea of trinary (or ternary) logic.

Most (but not all) computers today are based on binary arithmetic, because it is very easy to represent the two binary digits by the presence or absence of a voltage difference or of a current flow. Think of a light bulb. It is either on or off. We can easily map these two states to the two binary digits. It doesn't matter whether "on" is a "1" or a "0", as long as we interpret it consistently.

Now, the smart alecs out there are already thinking: what if the light bulb has a dimmer? Then it could have more than two states! Aye, but here's the rub: the more states you add, the harder it is to distinguish between them. Full on, full off, and half off - not too bad. Full on, mostly on, half on, mostly off, full off - starting to get a little trickier. And the dimmer knob has to be turned ever more carefully to pick one of the states, not like the regular light switch for on and off.

With circuitry, there is one other (in my opinion) fairly natural division of states. That would be positive, negative, and no voltage (or current.) That could map to either 0, 1, and 2, or "yes", "no", and "don't know", or (my preference) -1, 0, and 1. You can do a surprising amount of cool stuff with three states instead of two, although I have to admit that with the last scheme, counting is a little weird.

DecimalBinaryTrinary"Balanced" Trinary
00000000000= 0
1000100100+= 1
200100020+-= 3-1
300110100+0= 3+0
401000110++= 3+1
50101012+--= 9-3-1
60110020+-0= 9-3+0
70111021+-+= 9-3+1
81000022+0-= 9+0-1
91001100+00= 9+0+0

I've been playing around with the actual operations that can be done with three logic states, and it is pretty neat. You can read more about it here if you are interested.

You can respond to my ranting here.


If at first you don't rant, try, try again.