# Is the following a universal gate?

#### Baelor

Jul 27, 2018
1
From the basic definition of a universal gate,a universal gate can implement any Boolean function by connecting a sufficient number of them appropriately.
I came across this gate, and i am unable to determine whether it is a universal gate or not.

#### kellys_eye

Jun 25, 2010
6,037
Make your typical logic state table and, using fixed states for X and Y, determine the output states.

Do you know the 'type' of gate that can be used exclusively for 'universal' gate use?

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,509
If you know of another universal gate, and if you can make it using a combination of these, then this must also be a universal gate.

The things which may lead you on your way are finding a way to implement an inverter, and a simple (perhaps visual) understanding of Demorgan's laws.

#### Ratch

Mar 10, 2013
1,098
From the basic definition of a universal gate,a universal gate can implement any Boolean function by connecting a sufficient number of them appropriately.
I came across this gate, and i am unable to determine whether it is a universal gate or not.
View attachment 42230

Easy question to answer. Every time the two inputs on the gate are the same, the output is always "one". Therefore, no inversion can be made when both inputs are "one". That disqualifies it as a universal gate. Same with an XOR and NXOR gate.

Ratch

#### AnalogKid

Jun 10, 2015
2,804
With appropriate layers of DeMorgan's theorem, *any* gate with at least one inverting path between an input and the output meets your definition of a universal gate. The most common examples of parts you can actually buy would be a 2-input NAND or 2-input NOR gate.

ak

Moderator
Jan 21, 2010
25,509

Jun 10, 2015
2,804

#### Ratch

Mar 10, 2013
1,098
With appropriate layers of DeMorgan's theorem, *any* gate with at least one inverting path between an input and the output meets your definition of a universal gate. The most common examples of parts you can actually buy would be a 2-input NAND or 2-input NOR gate.

ak

I stand by what I said. Show me how to invert a "one" with the gate that the OP submitted. NAND and NOR gates are known to be universal logic gates.

Ratch

#### Ratch

Mar 10, 2013
1,098
I'm not so sure...

Be sure, be very sure. If you cannot invert a "one", how can it be a universal gate?

Ratch

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,509
Be sure, be very sure. If you cannot invert a "one", how can it be a universal gate

By wiring it as an inverter. It's trivial. Tie one input to logic 0 and the other input will cause the output to be inverted. I will leave it up to you to determine which input is which.

#### Ratch

Mar 10, 2013
1,098
By wiring it as an inverter. It's trivial. Tie one input to logic 0 and the other input will cause the output to be inverted. I will leave it up to you to determine which input is which.

Not only is it trivial, it is wrong. Both inputs have to be at the same logic level, otherwise any gate could be considered a "universal" gate.

Ratch

#### AnalogKid

Jun 10, 2015
2,804
Both inputs have to be at the same logic level,
Where did that come from? Of what use is a gate with external pins forced to a common logic level? The only condition that gives *any* gate usefulness is different logic levels on the inputs.
otherwise any gate could be considered a "universal" gate.
No, any non-inverting gate cannot be a universal gate.

The quote is technically correct, but implies a reasoning path that is incorrect. This is one of the informal fallacies. NOR and NAND gates are universal because they a) have more than one input; and b) at least one input-to-output path is inverting. The implication that both inputs having the same logic level causes a unique output is *not* what gives NOR and NAND gates "universality". The important feature that gives universality is not that there is one unique output for the set of four input combinations, it is that that output is inverted.

While we usually think of combinatorial logic as self-contained and input-directed, it also can be output-directed. An open-collector inverter is the minimal universal gate, but it requires an external collector resistor for combining to happen. Even more minimal is a single n-channel MOSFET (plus an external drain resistor). Along this same line, a ULN200x/280x Darlington transistor driver array makes a *great* universal logic part for high noise and rugged environments.

ak

Last edited:

#### Ratch

Mar 10, 2013
1,098
Where did that come from? Of what use is a gate with external pins forced to a common logic level? The only condition that gives *any* gate usefulness is different logic levels on the inputs.

I will grant your point that the inputs do not have to be at the same logic level.

However, the submission of the OP is automatically disqualified from being a universal gate because it is a combination of two different gates; specifically an OR gate and an INVERTER at the input. That makes it a combination gate and breaks the definition of a single universal gate.

Ratch

#### BobK

Jan 5, 2010
7,682
I think we need a definition of "universal gate" to resolve this dispute.

To me, it means a gate that any other gate can be made from a circuit using only instances of that gate. By that definition it is a universal gate.

Bob

#### Ratch

Mar 10, 2013
1,098
I think we need a definition of "universal gate" to resolve this dispute.

To me, it means a gate that any other gate can be made from a circuit using only instances of that single gate. By that definition it is a universal gate.

Bob

Your definition is correct, but your implementation is wrong. As I pointed out in my previous post, the OP's submission is a 2-level combination gate. That makes it a no-no for consideration as a universal gate.

Ratch

#### BobK

Jan 5, 2010
7,682
Put a black box around it and call it a gate. I think you are being overly pedantic.

Bob

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,509
As I pointed out in my previous post, the OP's submission is a 2-level combination gate. That makes is a no-no for consideration as a universal gate.

By that definition some NAND and NOR gates are not universal gates because their buffered outputs (which are essentially additional inverters added to the outputs) would make them a combination gate.

#### Ratch

Mar 10, 2013
1,098
Put a black box around it and call it a gate. I think you are being overly pedantic.

Bob

The definition of a universal gate depends on the same type of gate being able to produce the same outputs of other gates . A black box makes the definition indeterminate.

Ratch

#### Ratch

Mar 10, 2013
1,098
By that definition some NAND and NOR gates are not universal gates because their buffered outputs (which are essentially additional inverters added to the outputs) would make them a combination gate.

How they are manufactured is not of interest. When you see the OP's submission on the market and accepted as a basic logic gate, then you can judge whether it is a universal gate or not. But right now, it takes two discrete logic gates to make the OP's submission.

Ratch

#### BobK

Jan 5, 2010
7,682
There are only 16 possible boolean functions of 2 onputs and 1 output. FPGAs implement all of them, so this is a gate that is a basic gate in some implenentations.

Bob

Replies
1
Views
474
Replies
6
Views
1K
Replies
11
Views
2K
Replies
4
Views
2K
Replies
5
Views
4K