Instructor: Alexander Stoytchev CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/
NAND and NOR Logic Networks CprE 281: Digital Logic Iowa State University, Ames, IA Copyright © Alexander Stoytchev
Administrative Stuff HW2 is due today
Administrative Stuff HW3 is out It is due on Monday Sep 15 @ 4pm. Please write clearly on the first page (in BLOCK CAPITAL letters) the following three things: Your First and Last Name Your Student ID Number Your Lab Section Letter Also, please Staple your pages Use Letter-sized sheets
Quick Review
The Three Basic Logic Gates x 1 2 × x 1 2 + x NOT gate AND gate OR gate [ Figure 2.8 from the textbook ]
Truth Table for NOT x 1 x
Truth Table for AND x 1 2 ×
Truth Table for OR x 1 2 +
DeMorgan’s Theorem
Example 2.10 Implement the function f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7)
Minterms and Maxterms (with three variables) [ Figure 2.22 from the textbook ]
Minterms and Maxterms (with three variables)
The SOP expression is: This could be simplified as follows:
Example 2.12 Implement the function f(x1, x2, x3) = Π M(0, 1, 5), which is equivalent to f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7)
Minterms and Maxterms (with three variables)
The SOP expression is: This could be simplified as follows:
Two New Logic Gates
NAND Gate x1 x2 f 1
NOR Gate x1 x2 f 1
AND vs NAND x 1 2 × x 1 2 × x1 x2 f 1 x1 x2 f 1
AND followed by NOT = NAND x 1 2 × x 1 2 × x1 x2 f 1 f 1 x1 x2 f 1
NAND followed by NOT = AND x 1 2 × x 1 2 × x 1 2 × x 1 x 2 x1 x2 f 1 f 1 x1 x2 f 1
OR vs NOR x 1 2 + x1 x2 f 1 x1 x2 f 1
OR followed by NOT = NOR x 1 2 + x1 x2 f 1 f 1 x1 x2 f 1
NOR followed by NOT = OR x 1 2 + x 1 2 + x1 x2 f 1 f 1 x1 x2 f 1
Why do we need two more gates?
Why do we need two more gates? They can be implemented with fewer transistors. (more about this later)
They are simpler to implement, but are they also useful?
Building a NOT Gate with NAND x x x f 1 x 1
Building a NOT Gate with NAND x x x f 1 x 1 impossible combinations
Building a NOT Gate with NAND x x x f 1 x 1 impossible combinations Thus, the two truth tables are equal!
Building an AND gate with NAND gates [http://en.wikipedia.org/wiki/NAND_logic]
Building an OR gate with NAND gates [http://en.wikipedia.org/wiki/NAND_logic]
Any Boolean function can be implemented Implications Any Boolean function can be implemented with only NAND gates!
NOR gate with NAND gates [http://en.wikipedia.org/wiki/NAND_logic]
XOR gate with NAND gates [http://en.wikipedia.org/wiki/NAND_logic]
XNOR gate with NAND gates [http://en.wikipedia.org/wiki/NAND_logic]
Building a NOT Gate with NOR x x x x f 1 x 1
Building a NOT Gate with NOR x x x x f 1 x 1 impossible combinations
Building a NOT Gate with NOR x x x x f 1 x 1 impossible combinations Thus, the two truth tables are equal!
Building an OR gate with NOR gates [http://en.wikipedia.org/wiki/NOR_logic]
Let’s build an AND gate with NOR gates
Any Boolean function can be implemented Implications Any Boolean function can be implemented with only NOR gates!
NAND gate with NOR gates [http://en.wikipedia.org/wiki/NOR_logic]
XOR gate with NOR gates [http://en.wikipedia.org/wiki/NOR_logic]
XNOR gate with NOR gates [http://en.wikipedia.org/wiki/NOR_logic]
The following examples came from this book
[ Platt 2009 ]
[ Platt 2009 ]
[ Platt 2009 ]
DeMorgan’s theorem in terms of logic gates x 1 x 1 2 x 1 x x 2 2 (a) x x = x + x 1 2 1 2
DeMorgan’s theorem in terms of logic gates x 1 x x 1 1 x x 2 x 2 2 (b) x + x = x x 1 2 1 2
Function Synthesis
Using NAND gates to implement a sum-of-products x 1 2 3 4 5 [ Figure 2.27 from the textbook ]
Using NOR gates to implement a product-of sums x 1 2 3 4 5 [ Figure 2.28 from the textbook ]
Example 2.13 Implement the function f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7) using only NOR gates.
Example 2.13 The POS expression is: f = (x1 + x2) (x2 + x3) Implement the function f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7) using only NOR gates. The POS expression is: f = (x1 + x2) (x2 + x3)
NOR-gate realization of the function x1 f (a) POS implementation (b) NOR implementation x3 x2 [ Figure 2.29 from the textbook ]
Example 2.14 Implement the function f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7) using only NAND gates.
Example 2.14 The SOP expression is: f = x2 + x1x3 Implement the function f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7) using only NAND gates. The SOP expression is: f = x2 + x1x3
NAND-gate realization of the function x1 f x2 x3 (a) SOP implementation x1 f x2 x3 (b) NAND implementation [ Figure 2.30 from the textbook ]
Questions?
THE END