AND gate that uses trinary logic

vandveuser16776

Joined Feb 21, 2026
230
Let's organize your chart. here is highlighted and grouped in a Logical order.
Caddpture.JPG

As you can see clearly, for any double-zero AND, the result is Logic "LOW" and for any single Logic "HIGH" for an AND, the result is Logic "HIGH", and for double Logic "HIGH" we get Logic "HIGH" Logic "HIGH".
It means a column of Logic "LOW" overrides the outcome. If there is at least one Logic "HIGH" in in a column (one of the inputs of the ANDs) the outcome is Logic "HIGH" and for double Logic "HIGH" the outcome is Logic "HIGH",Logic "HIGH",.

This helps you visualize the sequences in simulator.
You need to go to Falstad and import the text from the downloadable file and simulate it
the file can be downloaded from Here
This is how it looks like
circuit-01.png
 

MisterBill2

Joined Jan 23, 2018
27,571
I must have missed the explanation of just exactly "trinary logic" is. That "truth table" in post #43 does not make any sense. I have seen a "any two out of three" and gate,implemented with standard CMOS 2-input AND gates and a triple input OR gate.
 

WBahn

Joined Mar 31, 2012
32,877
I must have missed the explanation of just exactly "trinary logic" is. That "truth table" in post #43 does not make any sense. I have seen a "any two out of three" and gate,implemented with standard CMOS 2-input AND gates and a triple input OR gate.
https://forum.allaboutcircuits.com/threads/and-gate-that-uses-trinary-logic.208931/post-2012237

Possibly the most widely used ternary logic system is Kleene logic, also known as K3, but there are several others.

In K3, the logic uses the labels False (F), Unknown (U), and True (T), with the ordering being F < U < T.

NOT flips F and T but leaves U unchanged.
AND returns the minimum value of the any of the inputs.
OR returns the maximum value of any of the inputs.

The definitions of equivalence and implication follow pretty directly from the normal logic interpretations.
 

WBahn

Joined Mar 31, 2012
32,877
"Fuzzy Logic" = Marketing Scam
Translation: messy conditional logic, written by a sloppy programmer to satisfy the marketing department.
As with many things, the fuzzy logic bandwagon attracted a host of wild speculation and promoters along with its share of hypesters and fraudsters. But the underlying concepts of fuzzy logic are well formulated and applications are deep and widespread in many areas for which it is a good match to the problem space, such as control systems, image recognition and feature extraction, medical decision making, complex system modeling, and a variety of others.
 

MisterBill2

Joined Jan 23, 2018
27,571
It would be interesting to see the proposed mechanism for adding a third condition to logical circuitry. With binary logic states a conditionis either ON or OFF. The proposal seems more towards analog computing, which has always been with us, but in vastly fewer applications. Certainly there is a place for analog, but certainly not everywhere!!!
 

vandveuser16776

Joined Feb 21, 2026
230
I deduced from the question and the Truth Table that the TS is talking about regular binary AND gate and just messed up the question. If it were Ternary AND gate, the Truth Table had to be 27 rows
I must have missed the explanation of just exactly "trinary logic" is. That "truth table" in post #43 does not make any sense. I have seen a "any two out of three" and gate,implemented with standard CMOS 2-input AND gates and a triple input OR gate.
I simulated and it matches all the outputs in the Truth Table. In my table, 0 = LOW, LOW, 1= HIGH, LOW, and 2= HIGH,HIGH
correct me what am I missing.
 

WBahn

Joined Mar 31, 2012
32,877
I deduced from the question and the Truth Table that the TS is talking about regular binary AND gate and just messed up the question. If it were Ternary AND gate, the Truth Table had to be 27 rows

I simulated and it matches all the outputs in the Truth Table. In my table, 0 = LOW, LOW, 1= HIGH, LOW, and 2= HIGH,HIGH
correct me what am I missing.
No, the TS was very specifically asking about trinary (aka, ternary, trivalent, three-valued, etc.) logic -- logic in which each variable can take on exactly one of three possible states.

The basic gate definitions are still between two operands. Just like addition and multiplication are defined between two operands, regardless of how many (including an infinite number) of values those operands can take on.
 

vandveuser16776

Joined Feb 21, 2026
230
No, the TS was very specifically asking about trinary (aka, ternary, trivalent, three-valued, etc.) logic -- logic in which each variable can take on exactly one of three possible states.

The basic gate definitions are still between two operands. Just like addition and multiplication are defined between two operands, regardless of how many (including an infinite number) of values those operands can take on.
Ok, understood, but which one of the facts on the right column of TS's table does not my design fulfill?
1 LED translates to 1, two LED translates to 2, and 0 LED translates to 0, which corresponds to the states in columns A&B.
Again, gate A LOW,LOW = 0 LOW,HIGH =1 and HIGH, HIGH =2. The same applies to gate B. Where is the flaw in the logic?
 

WBahn

Joined Mar 31, 2012
32,877
Ok, understood, but which one of the facts on the right column of TS's table does not my design fulfill?
1 LED translates to 1, two LED translates to 2, and 0 LED translates to 0, which corresponds to the states in columns A&B.
Again, gate A LOW,LOW = 0 LOW,HIGH =1 and HIGH, HIGH =2. The same applies to gate B. Where is the flaw in the logic?
Your design is not implementing trinary logic at all!

You are, at best, emulating it using multiple binary-valued variables to represent a single trinary variable.
 

MisterBill2

Joined Jan 23, 2018
27,571
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.
 

vandveuser16776

Joined Feb 21, 2026
230
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.
You tell me what you expect from the design to do for you, and I will tweak it or come up with something else. But for now, I am not sure what "2" is supposed to do? Would a 3-state rotary switch represent those 3 states :0,1,2 ?
 

MisterBill2

Joined Jan 23, 2018
27,571
I would certainly be interested in the actual implementation of other logic schemes, trinary or whatever.
Back in 1961 I did have a book that showed the development of octal binary circuits, including adders and multiplyers. Actual hard circuit binary octal number math gets complicaated quickly.

Given how well our present binary scheme works it does not seem reasonable to spend effort on an alternative scheme. I think that the alternatives were all investigated by the mid 1960's era. Binary has at least a solid 50 year headstart. In addition, I have seen no challeger systems.
Certainly there must be better topics for graduate school projects.

I have no desire for anyfolks to actually produce any designs for logic, especialy other than binary. My point of every comment in that direction is that the actual circuitry to achieve some functions may not even be possible. Suggesting the creation of an actual design for some function has for many years being my "secret trick" of leading folks to see that some idea will not work. It avoids a lot of arguing while allowing an individual to discover for themselves that something is either not possible or not feasable.. And, a couple of times, it has shown that I was in error. THAT, ALSO, is very educational.
 
Last edited:

vandveuser16776

Joined Feb 21, 2026
230
I never thought it would be useful either. Just like solving puzzles of any kind, and this one seemed a bit of a puzzle, but I agree that trinary logic feels redundant, given that there is nothing that binary cannot do. Just adding a layer of complexity does not mean more versatility and broader application.
 

WBahn

Joined Mar 31, 2012
32,877
I am not aware of any dedicated trinary chip. Could you give a part number please?
The TS wasn't asking about parts that they could purchase today. They were asking about how ternary logic could be implemented, in particular using MOSFETs.

Physical ternary logic implementations date back to 1958 and the Setun computer at Moscow State University. It exhibited reduced complexity compared to binary computers of the day.

Many demonstration chips have been made in CMOS, ranging from primitive functions up through full ALUs.

Like everything, ternary logic has advantages and disadvantages. If we were still in the age of TTL-type logic circuits, it's very possible that the advantages could outweigh the disadvantages because the circuit complexity for the individual gates would not be much more than a binary gate in TTL, allowing the overall reduced number of gates to offset it pretty easily. But in the age of the extremely simple switch-based circuits of binary CMOS gates, the added complexity of a ternary gate is a significant hurdle. At this point, because of the huge engrained infrastructure, both physical and intellectual, in binary-based computation, a multi-valued logic system would have to offer truly compelling advantages to gain traction.

But the notion of multi-level logic representation is all around us -- most Flash-based products use it to store information. This is one of the keys to getting huge memory densities in SSDs. I think most of the the stuff today is not using 3 states per cell, but 8- or even 16-states per cell and 32-level storage is in the demonstration stage and will probably hit the market in the not-too-distant future.

Because our computation, as noted above, is stuck in the binary world, we have to translate back and forth between the multi-level variables of the storage media and the two-level variables of the processing logic. Image if that could be eliminated by doing the computation directly using multi-level logic.
 
Last edited:

vandveuser16776

Joined Feb 21, 2026
230
.......... This is one of the keys to getting huge memory densities in SSDs. I think most of the the stuff today is not using 3 states per cell, but 8- or even 16-states per cell and 32-level storage is in the demonstration stage and will probably hit the market in the not-too-distant future.......
The irony: the cheapest SSDs are those stacked up ones
 
Top