Home

Projects Pico-8

Bomb-Guy GPIO Tests 01 GPIO Tests 02 GPIO Tests 03 GPIO Tests 04 GPIO Tests 05

Stuff:

Paper Press WS eInk Picture Frame

Ternary Logic:

Tern Gate T1

I believe I first learnt about ternary logic and ternary computing last year, and it was fascinating. Firstly, for being a way to compute so uncommon there have been practically no computers made using it, and also just the alien feel to the logic. After a little while of looking into it, I shunted it off to the back of my mind because I couldn't exactly wrap my head around how the gates worked.

I stumbled back onto the topic at the start of this year (2021), finding Tern (https://hackaday.io/project/6284-tern-ternary-logic-circuits), an attempt by Hackaday.io user Mechanical Advantage to make ternary logic using LM319s (High-speed Comparators) for the 2016 Hackaday prize.

I took a touch over an evening simply tying to wrap my head around how it worked. I'm not that experienced with physical electronics, even less so when there's no microcontroller involved, and I’d not really thought about negative voltages in circuits before so it took me a while to understand it. The next morning I had a look at the project again and noticed that right near the end of the project logs, as an aside, there’s mention and documentation of Mechanical Advantage figuring out MOSFET based monadic (single input) ternary gates, all of them. That’s what I latched onto.

The nomenclature I’m using for this project is modified slightly but based mostly on what’s used in Tern, which is based on the naming conventions of Dr Douglas W. Jones, a computer scientist mainly working on computer security, and who, on his page Standard Ternary Logic (http://homepage.cs.uiowa.edu/~jones/ternary/logic.shtml) disclaims “Nobody but the author endorses the use of the notation described here, although in general, the notations used by researchers in this field are abysmally bad and the author would like it if others accepted his proposed notation.”

---

Instead of numbers, I prefer using -, o, and + as symbols for the negative, ground and positive voltages used for logic.

I've also settled on a shorthand of either a superscript T to describe ternary gates (TSUM, TB, T7), or if not possible a prefix 'T-', or if I'm being extra lazy: just 'T'.

---

There are 27 moadic ternary gates (3^3) and are notated from 0-9 and A-Z though omitting I, J, L, O, Q, S, U, W, Y, I imagine mostly for readability. This is a couple more than what binary has: four.

(make into mono font)
GATE
0 1 2 3 4 5 6 7 8 9 A B C D E F G H K M N P R T V X Z
IN
- - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 +
0 - - - 0 0 0 + + + - - - 0 0 0 + + + - - - 0 0 0 + + +
+ - - - - - - - - - 0 0 0 0 0 0 0 0 0 + + + + + + + + +

.

.

.

.

.

.