# How to achieve this logic function simply?

I need logic gate that behaves like this:

A=1, B=1, Y=1

A=0, B=0, Y=1

A=0, B=1, Y=1

A=1, B=0, Y=0

The tricky part is (A=1, B=0, Y=0) while (A=0, B=1, Y=1), AFAIK no logic gate distinquish between A or B inputs so dont think its possible with normal gate, is it possible at all?

• Is there a typo in the 2nd line? Why doesn't that line have a B? May 5, 2020 at 14:34
• nA + B is the minimum as far as I can tell. May 5, 2020 at 14:44
• I dont have an answer for voltage levels or logic type as its only theory but why does that matter for answering this question? I can select the suitable logics chips myself , the logic itself should be the same regardless of voltages. Assume any voltage or type. If A would inverted ONLY in the case of (A=1, B=0) then yes that work, or more simply when (A=1, B=0, Y=0)... but I think that is pretty much the point of the question
– Jay
May 5, 2020 at 15:31
• @Jay, because some logic families (differential ECL, for example) don't require an extra gate to perform the NOT operation. May 5, 2020 at 16:02
• @Andyaka or $\overline{A\overline{B}}$ if you consider NAND to be a simpler gate than OR. May 5, 2020 at 16:10

I believe this is the simplest way to achieve what you are looking for: simulate this circuit – Schematic created using CircuitLab

Edit: As KingDuken points out in the comments, this is known as an imply gate.

• Thanks @KingDuken I should have seen that right away. Please see edits May 5, 2020 at 15:40
• Thank you, since my A signal was already going through an inverter this works perfectly, not only can it be done with 1 gate but the rest of the circuit is simpler too.
– Jay
May 5, 2020 at 16:20

If you're looking for a single logic gate that provides the output you desire, there is no such thing. User @evildemonic has given you the appropriate solution for the most minimal logic gates you can have to achieve your output.

Here is a circuit with transistor logic that can be rather minimal, based on @evildemonic's answer. simulate this circuit – Schematic created using CircuitLab

At the end of the day, logic gates are made of these transistors (that behave like switches under the right conditions) so technically this is the most minimal you can design what you're looking for.

Practically it's not likely to be able to do this with a single gate (unless you're doing an ASIC design), but you could do it with a single chip, using a dual (or quad) NAND part: simulate this circuit – Schematic created using CircuitLab