As with Boolean logic, you start with what your levels mean and then define how they can be combined using various operators.While it can be made to function on paper , it will probably be a challenge to produce the function in actual electronic hardware. AND I wonder if the TS has considered the fuctionality of a trinary FlipFlop? OR is this added logic scheme restricted to AND gate logic?? Please show us how it works with the rest of logic functions.
In the most common ternary logic system, K3, the three values are (as mentioned above) F < U < T. Unlike the Boolean True and False, which have no intrinsic order, the values in K3 (and most multi-level logic systems) are ordered and then plays a role in understanding the operator definitions.
The Negation (NEG) operator flips the values, leaving U unchanged.
This can be implemented in CMOS using transistors whose thresholds are controlled such that with a voltage near half the supply voltage is applied, the output voltage is near half the supply voltage. In binary CMOS, this is bad juju, because it results in an undefined output at best, and potentially destructive shoot-through currents at worst. But this is not the case in ternary logic because the transistors are designed to implement ternary logic, not binary logic.
What is commonly called the AND and OR operators (and I think that this is unfortunate, because it naturally leads people into trying to interpret these functions in terms of the 'and' and 'or' notions of everyday language and the binary-logic interpretations that arose from it) should properly be (and in some systems are) called MIN and MAX, respectively.
This is one of the reasons that mathematical logicians don't like to use AND and OR, but rather "conjunction" (using the '^' symbol) and 'disjunction' (using the 'v' symbol).
The MIN function yields the minimum value of any of its inputs, while the MAX function returns the maximum value of any of its inputs. These work for N-value logic and, in the case of 2-value logic (i.e., Boolean logic) reduce to our familiar AND and OR.
For any other functions, you simply define them using the generalization of the NOT, AND, and OR definitions in binary logic to use NEG, MIN, MAX.
For example, implication (IMP) in binary has the form:
A -> B = AND(NOT(A), AND B)
In ternary logic, it has the same functional definition
A -> B = MAX(NEG(A), B)
XOR is defined, in binary, as
XOR (A, B) = OR( AND( NOT(A), B ), AND( A, NOT(B) ) )
In multi-level logic, it is defined as
XOR (A, B) = MAX( MIN( NEG(A), B ), MIN( A, NEG(B) ) )
If you slog through writing the truth table, what you will discover is that it reduced to the Boolean XOR function when both inputs take on Boolean values.
As for the Flip Flop, I don't know what the issue is. The basic notion of a Flip Flop is the D-type flip flop which stores the value at it's input, which is all that a ternary flip flop would be required to do.