Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 352 Digital System Fundamentals

Similar presentations


Presentation on theme: "ECE 352 Digital System Fundamentals"— Presentation transcript:

1 ECE 352 Digital System Fundamentals
Universal Gates In this presentation, we will discuss the idea of a universal logic gate.

2 Universal Gates Universal: a gate or group of gates that can implement all basic Boolean operations AND, OR, NOT are together universal NAND, NOR are each universal Example: NAND gate Can implement F = A Can implement F = A·B Can implement F = A+B A universal gate is a type of gate that can be used to implement ANY Boolean function (though it may require more than one of them to do so). The combination of AND, OR, and NOT gate types is universal, because we can use just those gate types to implement any truth table. NAND and NOR gates are also universal, because we can implement any truth table using just NAND gates or just NOR gates. Let’s look at the NAND gate, and show how we can use that to implement the three basic logic functions, AND, OR, and NOT First, we can implement the NOT function by taking the same input signal and connecting it to all of the NAND inputs. This ANDs signal A with itself before complementing the result. Alternately, we can NAND the A signal with a constant 1, which also produces /A  as the output. NAND gates can implement an AND function by complementing the output of one NAND using another NAND to implement the NOT. The double complement cancels out. Finally, NAND gates can implement an OR function by taking advantage of De Morgan’s Law. When implementing A OR B, we complement A and complement B before NANDing them together. According to De Morgan’s, the result is logically equivalent to an OR function. This means that if you have a function built of AND, OR, and NOT gates, you know it is possible to replace each with some number of NAND gates and preserve the logical correctness of the circuit.

3 Universal Gates Can convert any combinational circuit to use universal gates using Boolean algebra Often using De Morgan’s in addition to other identities Can use a “visual” approach by drawing the circuit, and using Boolean algebra with the gates A  ∙  B = A + B A  +  B = A·B We can transform logic functions algebraically to use a universal gate such as a NAND or a NOR by using Boolean algebra to transform the function. We can also transform a circuit directly by visually applying Boolean algebra transformations such as De Morgan’s Law. A = A

4 Universal Gates Example
Now we’ll show examples of transforming a circuit to use only NOR gates or only NAND gates. We start with the original circuit, which uses a combination of NOT, AND, and OR gates. We will modify this circuit to use only NOR gates and inverters (which can themselves be implemented using NOR gates) We can add two NOT gates in series, which is equivalent to a wire, and turn one of those inverters into a bubble for the NOR gate, and the other inverter into a bubble on the input of the AND gate Next, we can slide the bottom inverter forward to turn it into a bubble on the other input of the AND gate. Remember, an AND gate with complemented inputs is equivalent to a NOR gate, according to De Morgan’s Law. Next, we can take the same circuit, and modify it to use NANDs using similar transformations where we take advantage of double-NOT gates and De Morgan’s Law.

5 How to Prove Gate is Universal?
Example: “M” gate, where M = A + B Use one or more M gates to implement either… NOT and OR NOT and AND NAND NOR The M gate is universal! So, how do we prove if a particular gate or logic circuit is universal? Well, we already did this for the NAND gate when we showed it can implement the NOT, OR, and AND functions. But since we already known that the NAND and NOR functions are universal, we really only need to show it can implement NOT and OR (which lets us build a NOR), or NOT and AND (which lets us build a NAND). Alternately, we can directly show it can implement a NAND or a NOR. Which of these is simplest depends on the logic function you’re working with. In this case, the M gate already contains an OR operator in its logic function, or, we will prove the M gate is universal by showing that it can implement the NOT function and the OR function. Usually it’s easiest to start with the NOT function. The A input of the M gate is complemented, so we will make use of that. Then, to get rid of the OR function, we can OR with 0. We now have an implementation of the NOT function. The M gate already implements an OR function, but with one input complemented. So we use another M gate to provide that NOT function. The double-complement cancels out, and we have an implementation of the OR function. We have now shown that the M gate is universal, by proving we can implement a NOT function and an OR function using only M gates. F = X F = X + Y X X X X  + Y X  + 0 = X = X + Y Y

6 ECE 352 Digital System Fundamentals
Universal Gates This concludes our video on universal gates.


Download ppt "ECE 352 Digital System Fundamentals"

Similar presentations


Ads by Google