Ternary Computing

Ternary Computing

Ternary computing is done with a base state of 3 possibilities, unlike the well known 2 states of binary. A single state is called a trit compared to a bit in binary. Where 8 bits make up a byte, 6 trits make a tryte with a total capacity of 729 possibilities. You would write these 3 states in base-3 as 0, 1 and 2. But I prefer using the balanced method, this means the states are -1, 0 and 1. But for notation purposes a single character is easier; thus -, 0 and +. The advantage of this method is that it has a better translation to what happens on an analog level, and both fuzzy and crisp logic can be applied.

Tri-state logic(base-3) is the only absolute base that is closest to base-e (2.71828); which is the most efficient base to represent any fraction.

The inherit value of a trit state can be one of the following three:

  • - is a negative (non-)discrete change, or false.
  • 0 is no change, unsure, both, either or neither.
  • + is a positive (non-)discrete change, or true.

These possibilities combined with the context dependent interpretation make ternary computing a good choice for things as artificial intelligence, chaotic computing, branch simulations, and generic balanced logic.

The ternary truth table can be quite large compared to that of binary as it has 19683 functions instead of 16. Therefor a small and familiar subset:

IN A IN B AND(&) OR(|) XOR(^) EQ(=) LT(<) GT(>) NOT(!) ADD(+) SUB(-) MUL(*) DIV(/) MIN({) MAX(})
- - - - - + 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 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 + + + +

Comments

comments powered by Disqus