ENGG 1203 Tutorial n n n Combinational Logic
ENGG 1203 Tutorial n n n Combinational Logic (I) 1 Feb Learning Objectives q q n n Recall Boolean Algebra (So. P/Po. S, De. Morgan's Theorem, grouping, redundant) Simplify logic expressions News q Lab, TA office hour q Tutorial: http: //www. eee. hku. hk/~culei/ENGG 1203. html Ack. : HKU ELEC 1008, Wikimedia Commons 1
Quick quiz n 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 2
Quick quiz n 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 3
Quick quiz n 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 4
Quick quiz n What is the output expression of the following logiccircuit diagram? • • 5
Boolean Algebra n Boolean Algebra A+B=B+A A + (B + C) = (A + B) + C A + BC = (A + B) (A + C) A + AB = A NOT (A)) = A n AB = BA A (BC) = (AB) C A (B+C) = AB + AC A (A + B) = A More questions in Appendix 6
De Morgan’s Theorem n De Morgan's theorem n Bubble pushing via De Morgan's theorem q AND NOT OR q NOT OR AND NOT q OR NOT AND q NOT AND OR NOT 7
Solution 2 n Use De. Morgan's Theorem for simplification n 8
Boolean Algebra Simplification n 9
Boolean Algebra Using SOP and POS n Find an expression for F and 10
Solution n Sum of Products for F n Product of Sums for F 11
Solution n Sum of Products for n Product of Sums for 12
Representing logic operations n Each function can be represented equivalently in 3 ways: q q q Truth table – Try every combinations of every input variables Boolean logic expression – SOP/POS + Simplify the expression Schematics – Construct from Boolean expressions 13
From logic equations n Boolean expressions Truth table and logic circuit (AND/OR/NOT) 0 1 1 14
From logic equations n Boolean expressions Truth table and logic circuit (AND/OR/NOT) 15
From truth tables n n Derive the Boolean expression of the output x in terms of the input Construct the logic circuit using AND gates, OR gates, and INVERTERs. 16
Solution Extra redundant Terms 1. Construct A/B/C 2. Construct not A/B/C 3. Construct AND gates 4. Construct OR gate 1 2 3 4 17
From truth tables n Truth table Boolean expressions and logic circuit 18
From schematics • Truth table first? • SOP/POS first? 19
From schematics XOR 20
Circuit representation of logic equations n Show can be implemented with one two -input NOR and one two-input NAND gate. n (How to convert q ? ) We need to apply De Morgan’s Theorem 21
Circuit representation of digital logic n n 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 the circuit using Boolean algebra. 22
Solution (a) Procedure: 1) Obtain the Boolean expression from the circuit 2) Check if we need NAND/NOR gate 3) Simplify the expression by Boolean algebra • Less gate (power and resource) • Shorter “longest path” 23
Solution (b) n First, we convert the circuit 24
Solution (b) n Then, we simplify the Boolean expression (De. Morgan's Theorem) (Expand) (Simplify) (Group, Group) 25
Solution (b) (Group, Group) (Simplify) (Expand) (Simplify) 26
Conversion of three representations n n Describe the function using Boolean expressions Draw the truth table and describe the function using sum of product 27
Solution Approach 1: Boolean simplification Find TT Approach 2: Construct TT Find POS (De Morgan) (XOR expansion) (De Morgan) (expansion) (grouping, expansion) (cancellation) POS: 28
Karnaugh map n n Draw the table Fill in 0 s and 1 s 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 29
Karnaugh map n 30
Examples of Karnaugh maps 31
(Appendix) Questions for Boolean algebra 32
Solutions 33
(Appendix) Determining output level from a diagram 34
(Appendix) From logic equations n Draw the circuit diagram to implement the expression n Draw the circuit diagram that implements the expression using gates having no more than three inputs. 35
(Appendix) Circuit representation of digital logic n Construct the given circuit using NAND gates only q q Top down approach: ? Bottom up approach: ? 36
Solution (a) n n Top down: Expanding the Boolean expression By De. Morgan’s Theorems, 37
Solution (b) n i) Bottom-up: Construct NOT gate, AND gate and OR gate from NAND gate iii ) 38
Solution (b) (cancelled) n Top-down and Bottom-up: Same number of gate, same configuration, different approach 39
- Slides: 39