410 likes | 731 Views
ENGG 1203 Tutorial. Combinational Logic (I) 1 Feb Learning Objective s Recall Boolean Algebra ( SoP / PoS , DeMorgan's Theorem, grouping, redundant) Simplify logic expressions News Lab, TA office hour Tutorial : http://www.eee.hku.hk/~culei/ENGG1203.html
E N D
ENGG 1203 Tutorial • Combinational Logic (I) • 1 Feb • Learning Objectives • Recall Boolean Algebra (SoP/PoS, DeMorgan's Theorem, grouping, redundant) • Simplify logic expressions • News • Lab, TA office hour • Tutorial: http://www.eee.hku.hk/~culei/ENGG1203.html • Ack.: HKU ELEC1008, Wikimedia Commons
Quick quiz • What is the only set of input conditions that will produce a LOW output for any OR gate? • Any one of the input is LOW • Any one of the input is HIGH • All inputs are LOW • All inputs are HIGH
Quick quiz • What logic level should be applied to the second input of a two-input AND gate if the logic signal at the first input is to be inhibited (prevented) from reaching the output? • A LOW input will keep the output LOW • A LOW input will keep the output HIGH • A HIGH input will keep the output LOW • A HIGH input will keep the output HIGH
Quick quiz • What is the only input combination that will produce a HIGH at the output of a five-input AND gate? • Any one of the input is LOW • Any one of the input is HIGH • All inputs are LOW • All inputs are HIGH
Quick quiz • What is the output expression of the following logic-circuit diagram?
Boolean Algebra • Boolean Algebra • More questions in Appendix
De Morgan’s Theorem • De Morgan's theorem • Bubble pushing via De Morgan's theorem • AND NOT NOT OR • NOT OR AND NOT • OR NOT NOT AND • NOT AND OR NOT
Solution 2 • Use DeMorgan's Theorem for simplification
Boolean Algebra Simplification • Sum of Products • Find out the “1”s • Better if less “1” • Products of Sum • Find out the “0”s • Better if less “0”
Boolean Algebra Using SOP and POS • Find an expression for F and
Solution • Sum of Products for F • Product of Sums for F
Solution • Sum of Products for • Product of Sums for
Representing logic operations • Each function can be represented equivalently in 3 ways: • Truth table – Try every combinations of every input variables • Boolean logic expression – SOP/POS + Simplify the expression • Schematics – Construct from Boolean expressions
From logic equations • Boolean expressions Truth table and logic circuit (AND/OR/NOT) 0 1 0 1 1
From logic equations • Boolean expressionsTruth table and logic circuit (AND/OR/NOT)
From truth tables • Derive the Boolean expression of the output x in terms of the input • Construct the logic circuit using AND gates, OR gates, and INVERTERs.
Solution Extra redundant Terms 1. Construct A/B/C2. Construct not A/B/C3. Construct AND gates4. Construct OR gate 4 1 2 3
From truth tables • Truth table Boolean expressions and logic circuit
From schematics • Truth table first? • SOP/POS first?
From schematics XOR
Circuit representation of logic equations • Show how can be implemented with one two-input NOR and one two-input NAND gate. • (How to convert ?) • We need to apply De Morgan’s Theorem
Circuit representation of digital logic • a) Simplify the circuit shown in the figure using Boolean algebra. • b) Change each NAND gate in the circuit of the figure to a NOR gate,and simplify thecircuit usingBoolean algebra.
Solution (a) Procedure: 1) Obtain the Boolean expression from the circuit2) Check if we need NAND/NOR gate3) Simplify the expression by Boolean algebra • Less gate (power and resource) • Shorter “longest path”
Solution (b) • First, we convert the circuit
Solution (b) • Then, we simplify the Boolean expression (DeMorgan's Theorem) (Expand) (Simplify) (Group, Group)
Solution (b) (Group, Group) (Simplify) (Expand) (Simplify) (Simplify)
Conversion of three representations • Describe the function using Boolean expressions • Draw the truth table and describe the function using sum of product
Solution Approach 1: Boolean simplification Find TTApproach 2: Construct TT Find POS (De Morgan) (XOR expansion) (De Morgan) (De Morgan) (expansion) (grouping,expansion) (cancellation) POS:
Karnaugh map • Draw the table Fill in 0s and 1s Grouping • Group one/two/four/eight/sixteen ‘1’(s) only • Use the least number of groups to group all numbers • To group as many numbers as possible in every group
Karnaugh map • F(x) = + +
(Appendix) From logic equations • Draw the circuit diagram to implement the expression • Draw the circuit diagram that implements the expression using gates having no more than three inputs.
(Appendix) Circuit representation of digital logic • Construct the given circuit using NAND gates only • Top down approach: ? • Bottom up approach: ?
Solution (a) • Top down: Expanding the Boolean expression • By DeMorgan’s Theorems,
Solution (b) • Bottom-up: Construct NOT gate, AND gate and OR gate from NAND gate iii) i) ii)
Solution (b) • Top-down and Bottom-up: Same number of gate, same configuration, different approach (cancelled)