Maker Pro
Maker Pro

Is the following a universal gate?

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
How they are manufactured is not of interest.

Ok, so if I can manufacture a NAND gate using the OP's gate, I am justified in calling that NAND gate "universal", but the one type of gate which is used to make the NAND gate is not?
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
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

You have to be joking. A FGPA is an array of programmable logic blocks that can be wired together to implement complex functions. It is not a simple basic recognized single gate that the definition of a universal logic gate requires.

Ratch
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
Ok, so if I can manufacture a NAND gate using the OP's gate, I am justified in calling that NAND gate "universal", but the one type of gate which is used to make the NAND gate is not?

No more than you can call an AND gate a universial gate by tacking an INVERTER on the output to make it a NAND gate. Besides, the OP's gate in not defined to be a basic gate (AND, NOR, etc). It is a complex gate.

Ratch
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
What nonsense. Apparenty, You can have an inverted outout, but not an inverted input. A NAND gate is basic, but if I remove the inverter on the output and put inverters on the two inputs it is no longer a single gate even though it implements the same function with the same circuit and all you have changed is the symbol. Or do you have another secret rule that covers this one as well?


Bob
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
What nonsense. Apparenty, You can have an inverted outout, but not an inverted input. A NAND gate is basic, but if I remove the inverter on the output and put inverters on the two inputs it is no longer a single gate even though it implements the same function with the same circuit and all you have changed is the symbol. Or do you have another secret rule that covers this one as well?


Bob

A gate with inverted inputs is not a basic gate. An AND gate with an inverted output is considered a basic gate. Perhaps you would like to peruse this link. I don't agree with it, but you probably do. They advocate nonbasic compound gates and show how they are universal. In fact, the example is the same as the OP's gate.
https://www.allaboutcircuits.com/technical-articles/universal-logic-gates/

Ratch
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I see no reason to exclude any of the 16 possible two input, one output gates as non-basic.

Bob
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
I see no reason to exclude any of the 16 possible two input, one output gates
So what is excluded? Any 2-input gate has 4 possible input combinations and 2 possible outputs for each input combination. But the gate function is determined by selecting just one of the possible outputs for each of the 4 possible input combinations; therefore, the gate's function can be represented by a 4-digit binary number. So there are 16 possible gate functions.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I am referring to Ratch saying some of them are basic and others are compound. I am disagreeing with that.

Bob
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
There are 7 basic gates as described in this link. Look at the top of the first page. http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/index.html#logicgates . Only two (NAND and NOR) are universal gates. The OR gate with one inverted input is not considered a basic gate, and is not something you can buy. It has no name, only a description. You have to add an inverter to one of the inputs or program an inverter in a logic array to get such a thing. Then you are using two different gates. You can dream up some gate which outputs a diverse logic function, but again, that is not a basic logic gate as listed in the above link. Some might say a NAND/NOR is an AND/OR with an inverter attached to the output, but it is easier to make NAND/NOR because the inversion is automatic in a common emitter configuration.

This whole discussion is a mental masturbation exercise. No one designs logic circuits with only one type of logic gate.

Ratch
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
There are 7 basic gates as described in this link. Look at the top of the first page. Only two (NAND and NOR) are universal gates.

But not all possible gate functions are described in that link, and only two of those described are universal. Note that to be a universal gate function the gate does not necessarily need to be commercially available nor even especially useful - just that it can (theoretically) be used to generate all other gate functions.

There are basic gates, there are universal gates, and a few which are basic and universal. Don't be confused.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
An interesting universal gate is the two input mux. It can't implement nand or nor on its own, but it can implement xor, or, and, and not, so with 2 of them you can implement nand and nor.

Incidentally, it implements xor faster than using conventional logic gates.

And it can implement the logic function in question in this thread with a single 2 input mux.
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
But not all possible gate functions are described in that link, and only two of those described are universal. Note that to be a universal gate function the gate does not necessarily need to be commercially available nor even especially useful - just that it can (theoretically) be used to generate all other gate functions.

There are basic gates, there are universal gates, and a few which are basic and universal. Don't be confused.

There are basic or simple gates and compound or exotic gates. I don't think that the latter should be considered as a candidate for a universal gate. Same with MUX's and PLA's. You can dream up a logic function that would take several basic functions to implement and call it a universal gate. I don't think that is what the definition writer had in mind when he thought up that concept. As I said before, no one uses a single gate type anyway for serious design.

Ratch
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
An interesting universal gate is the two input mux. It can't implement nand or nor on its own, but it can implement xor, or, and, and not, so with 2 of them you can implement nand and nor.

Incidentally, it implements xor faster than using conventional logic gates.

And it can implement the logic function in question in this thread with a single 2 input mux.

As I said above, I don't think a MUX or its relatives like PLA's should be considered as a single gate.

Ratch
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
As I said above, I don't think a MUX or its relatives like PLA's should be considered as a single gate.

That sounds like opinion.
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
That sounds like opinion.
True, but it is based on the observation that creating a complex gate out of two or more basic gates, and calling it a new single gate, is cheating a bit on the definition of a single gate.

Ratch
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yes, but you also make a distinction between a gate with an inverter added at the output and a gate with an inverter added at one input. There seems to be no logical distinction other that perhaps some appeal to symmetry.

As @BobK points out, there is a simple list comparing all possible functions of a 2 input gate. This ignores the implementation of the gate, and can then be used to exhaustively determine all the possible universal gates. It turns out that all you need is a gate which has one output state that can only be achieved with a single set of input states.

As an example, consider a transmission gate with a down on the output. It implements one of the 16 functions and one that is universal. The function is NAND.

Change that pull down to a pull up and look at the logic function. It's not NOR.

The only reason why NAND and NOR (and AND and OR) exist while these odd gates don't is that they may be easier to imagine, and can be more simply expressed in Boolean algebra. However, that's a failure of our thinking and of the available Boolean operators. The XOR function is not one of those "simple" gates (and neither is it universal) but it has it's own symbol in Boolean algebra. Dear Morgan's law is different for XOR, why can't there be a gate with different Associative, Commutative, and/or Distributive laws? When handling XOR we often break it down into an equivalent using AND, OR, and inversion, the same could apply to some other new gate type symbol for the new gate type "left inverted OR" or perhaps LOR?

Once we have this, then we find that LOR is simpler than OR in silicon, and can be manipulated just like AND and OR in Boolean algebra, and can be used in its own to implement any other logic function.

How does it now differ from NAND or NOR (other than being ugly)?
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
Yes, but you also make a distinction between a gate with an inverter added at the output and a gate with an inverter added at one input. There seems to be no logical distinction other that perhaps some appeal to symmetry.

Even though a NAND gate can be thought of as an AND gate with an NOT attached to the output, it is defined to be a single basic gate. Regardless of its inversion ability, that property in baked into the definition and the NAND is considered to be a single entity, even though mathematically, it is two gates. The same is true for the NOR gate.

As @BobK points out, there is a simple list comparing all possible functions of a 2 input gate. This ignores the implementation of the gate, and can then be used to exhaustively determine all the possible universal gates. It turns out that all you need is a gate which has one output state that can only be achieved with a single set of input states.

As an example, consider a transmission gate with a down on the output. It implements one of the 16 functions and one that is universal. The function is NAND.

Change that pull down to a pull up and look at the logic function. It's not NOR.

Tacking on inverters to the inputs and outputs makes a gate a complex gate. Even if it can be shown to be equivalent mathematically to the definition of a universal gate.

The only reason why NAND and NOR (and AND and OR) exist while these odd gates don't is that they may be easier to imagine, and can be more simply expressed in Boolean algebra. However, that's a failure of our thinking and of the available Boolean operators. The XOR function is not one of those "simple" gates (and neither is it universal) but it has it's own symbol in Boolean algebra. Dear Morgan's law is different for XOR, why can't there be a gate with different Associative, Commutative, and/or Distributive laws? When handling XOR we often break it down into an equivalent using AND, OR, and inversion, the same could apply to some other new gate type symbol for the new gate type "left inverted OR" or perhaps LOR?

We have to go with what is defined and accepted.

Once we have this, then we find that LOR is simpler than OR in silicon, and can be manipulated just like AND and OR in Boolean algebra, and can be used in its own to implement any other logic function.

Perhaps, but it is not the accepted definition of a basic gate.

How does it now differ from NAND or NOR (other than being ugly)?

It is nonstandard.

Ratch
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Where is the definition of basic gate that you are using?

Bob
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
Where is the definition of basic gate that you are using?

Bob

Look at the link given in post #30 of this thread. At the very top is the title "Basic Gates and Functions".

Ratch
 
Top