this is a ques from a freescale placement paper..
Q.Name atleast 3 universal gates,and using them implement the NOT,AND,OR gates.
can anyone plz tell me the third universal gate.
3 universal gates are: NAND, NOR and Fredkin gate.
The basic Fredkin gate is a controlled swap gate that maps three inputs (C, I1, I2) onto three outputs (C, O1, O2). The C input is mapped directly to the C output. If C = 0, no swap is performed; I1 maps to O1, and I2 maps to O2. Otherwise, the two outputs are swapped so that I1 maps to O2, and I2 maps to O1.
3 universal gates are: NAND, NOR and Fredkin gate.
The basic Fredkin gate is a controlled swap gate that maps three inputs (C, I1, I2) onto three outputs (C, O1, O2). The C input is mapped directly to the C output. If C = 0, no swap is performed; I1 maps to O1, and I2 maps to O2. Otherwise, the two outputs are swapped so that I1 maps to O2, and I2 maps to O1.
I guess that (late night - cannot think deep now) this third gate would consist of a couple of exor gates. Why would this gate be a "universal gate" and not the exor gate?
Actually it sounds almost as a exor gate to me. Two inputs, by locking one input to logic 1, the output will be the inverted of the other input, and vice versa.
i think Prototyp_V1.0 is right,fredkin is actually equal to 2 exor gates,but svicent,please can u tell us how do we make the OR,AND gates using this fredkin gate,i tried makin OR,but the case A=0,B=0 wasnt being satisfied.
I connected a NOT gate(using exor) btw I1,I2 and then connected I1 to A,,,also connected C to the other input,lets say B.
You need the constants True and False to make the gates.
To make the NOT gate connect: C to A, True to I1, False to I2, Output O1.
To make the OR gate connect: C to A, B to I1, True to I2, Output O1.
To make the AND gate connect: C to A, False to I1, B to I2, Output O1.
The Toffoli gate is another universal gate.
The 3-bit Toffoli gate has 3 inputs I1, I2 I2 and 3 outputs O1, O2, O3. The 2 first output bits O1 and O2 are just I1 and I2. The last output bit O3 is (I1 AND I2) XOR I3.
A universal gate is a gate which can implement any Boolean function without need to use any other gate type.
So,the NAND and NOR gates are universal gates.
In practice, this is advantageous since NAND and NOR gates are economical and easier to fabricate and are the basic gates used in all IC digital logic families.
In fact, an AND gate is typically implemented as a NAND gate followed by an inverter not the other way around!!
Likewise, an OR gate is typically implemented as a NOR gate followed by an inverter not the other way around!!