Presentation is loading. Please wait.

Presentation is loading. Please wait.

©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 4 Using Logic Gates Roger.

Similar presentations


Presentation on theme: "©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 4 Using Logic Gates Roger."— Presentation transcript:

1

2 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 4 Using Logic Gates Roger L. Tokheim ©2008 The McGraw-Hill Companies, Inc. All rights reserved.

3 INTRODUCTION Logic Circuit from a Boolean expression Minterm and maxterm Boolean expressions Boolean expression from a truth table Truth table from a Boolean expression Simplifying Boolean expressions Karnaugh mapping NAND logic

4 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. INTRODUCTION (continued) Data selectors and their use Solving logic problems with data selectors Using computer simulations Variations in Boolean expressions DeMorgan’s theorem PLDs (programmable logic devices) BASIC Stamp® modules

5 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. “Tools of the Trade” for Solving Logic Problems Gate symbols Truth tables Boolean expressions Combinational logic circuits: AND-OR pattern of gates OR-AND pattern of gates AND-OR pattern of gates from Sum-of-products Boolean expression such as: AB + CD = Y OR-AND pattern of gates from Product-of-sums Boolean expression such as: (A+B) (C+D) = Y

6 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Logic Circuit From Boolean Expression Example: Draw the AND-OR logic diagram for the Boolean expression: Step 1: OR AB with CD Step 2: Add top AND gate Step 3: Add bottom AND gate AB + CD = Y ©2008 The McGraw-Hill Companies, Inc. All rights reserved.

7 Draw the OR-AND logic diagram for the Boolean expression: Step 1: Step 2: Step 3: QUIZ (A+B) (C+D) = Y

8 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Sum-of-products form: Also called the minterm form Product-of-sums form: Also called the maxterm form Boolean Expressions A B + C D = Y (A + B) (C + D) = Y

9 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ 1. The Boolean expression AB + BC = Y is in __________ (product-of-sums, sum-of- products) form. 2. The Boolean expression (A+B) (B+C) + Y is in __________ (product-of- sums, sum-of-products) form. 3. The Boolean expression (A+B) (B+C) = Y is in __________ (maxterm, minterm) form. 4. The Boolean expression AB + BC = Y is in __________ (maxterm, minterm) form. sum-of-products product-of-sums maxterm minterm

10 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Boolean Expression from Truth Table Write the Boolean expression that describes the logic in this truth table. Truth Table Input Output ABC Y 0 0 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 1 Step 1: Focus only on the truth table lines with outputs of 1. Step 2: AND the inputs for these two lines and logically OR the ANDed groups. Minterm Boolean expression: A B CA B C = Y+ A B CA B C = Y+

11 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Truth Table Input Output ABC Y 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 1 Write the Boolean expression that describes the logic in this truth table. Minterm Boolean expression: A B CA B C = Y+ QUIZ A B CA B C = Y+

12 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ Truth Table Input Output ABC Y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0001000100010001 1. Write the sum-of-products Boolean expression for this truth table. ______________________________A’BC + ABC = Y 2. Write the minterm Boolean expression for this truth table. ______________________________A’BC + ABC = Y

13 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Truth Table From Boolean Expressions Fill in a truth table from a minterm Boolean Expression. Minterm Boolean expression: Truth Table Input Output ABC Y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 Step 1: Place three 1s in output column. Step 2: Place five 0s in blanks in output column of truth table. ABC = Y= Y+ +

14 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Truth Table from Boolean Expressions Fill in a truth table from a minterm Boolean Expression. Minterm Boolean expression: Truth Table Input Output ABC Y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 Step 1: Place single 1 output column for term with three variables. Step 2: Place two 1s in output column for term with two variables. Step 3: Fill in 0s. = Y= Y A BA B C+

15 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ Truth Table Input Output ABC Y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1. Fill in the output column of the truth table for the Boolean expression A’B’C’ + ABC’ = Y. 1000001010000010

16 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ Truth Table Input Output ABC Y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1. Fill in the output column of the truth table for the Boolean expression A’B’ + AB’C = Y. 1100010011000100

17 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. This line is not to be considered in the loop. Unsimplified Boolean Expression Simplifying Boolean Expressions Truth Table Input Output ABC Y 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 RULE: Eliminate term within loop that contains a term and its complement. ABC = Y= Y + + + Simplified Expression: ABAC= Y= Y+

18 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. _ A B _ C C _ A B _ A B 11 1 1 C Simplify Boolean Expression (Karnaugh map method) Unsimplified Boolean expression (3 variables): Step 1: Plot 1s Step 2: Loop groups Step 3: Eliminate variables Step 4: Form simplified minterm expression ABC = Y= Y++ + A C + A B = Y= YSimplified Expression: BCBC

19 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Simplify Boolean Expression (Karnaugh map method) Step 1: Plot 1s Step 2: Loop groups Step 3: Eliminate variables Step 4: Form simplified minterm expression Unsimplified Boolean expression (4 variables): _ _ _ C D C D _ A B _ A B _ A B _ C D 1 1 1 1 ABCD = Y= Y++ + ABC ACDSimplified Expression: + = Y QUIZ BDBD

20 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Developing a NAND Logic Diagram Minterm expression: AB + AB = Y Step 1: Draw AND-OR logic diagram from minterm expression. Step 2: Substitute NAND gates for each inverter, AND, and OR gate. NOTE: Both logic diagrams will generate the same truth table.

21 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. 1-OF-8 Data Selector Logic Symbol: Data Selector 0 1 2 3 4 5 6 7 CBA W Data Inputs Data Select Inputs Output

22 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. What is the output from the data selector? Data Inputs Data Select Inputs: 0 1 2 3 4 5 6 7 CBA W 1 1 1 1 0 0 0 0 ? 1-of-8 Data Selector 1 0 1 HIGH H LOW HIGH LOW 0 0 1 0 0 01 1 1 QUIZ

23 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. 1-of-8 Data Selector Use the data selector to perform the logic described in the truth table 0 1 2 3 4 5 6 7 CBA W 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 0 Truth Table C B A Y ? 0 1 10 0 1 HIGH LOW HIGH 1 1 0 QUIZ

24 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Circuit Simulation - Using the Logic Converter Screen from Electronics Workbench® or MultiSIM® Truth table area Boolean expression area Conversion options Converts back and forth from Boolean expression, truth table, and logic diagram ©2008 The McGraw-Hill Companies, Inc. All rights reserved.

25 Truth Table to Boolean Expression Step1: Click number of variables. Step2: Fill in truth table. Step3: Click truth table to Boolean expression conversion option. A’B’C+A’BC+AB’C’+AB’C+ABC Unsimplified Boolean Expression appears here

26 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Simplifying the Boolean Expression Step1: Click number of variables. Step2: Fill in truth table. Step3: Click truth table to simplified Boolean expression conversion option. AB’ + C Simplified Boolean Expression appears here

27 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Boolean Expression to Logic Diagram Step1: Type the Boolean expression. Step2: Click Boolean expression to logic diagram conversion option. Step3: Close Logic Converter window. AB’ + C AB’+C=Y is converted into this AND-OR logic diagram by the simulation software

28 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ 1. A circuit simulator such as Electronic Workbench ® or MultiSIM ® contain a useful instrument called a __________ (logic converter, logic probe) used to convert back and forth from truth table to Boolean expression. 2. The logic converter instrument from Electronic Workbench ® or MultiSIM ® can convert back and forth from logic diagram to Boolean expression. (True or False) logic converter True

29 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Variations in Boolean Expressions Boolean expression (textbook style): Boolean expression (keyboard style): A’B + CD’ = Y A B + C D = Y (A + B)’ = Y A + B = Y A B = Y A’ B’ = Y

30 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ 1. The Boolean expression A B + C D = Y is written as _______ in keyboard style. A B’ + C’D = Y 2. The Boolean expression A+B+C = Y is written as _______ in keyboard style. (A+B+C)’ = Y 3. The Boolean expression A B C = Y is written as _______ in keyboard style. A’ B’ C’ = Y

31 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. DeMorgan’s Theorems First theorem: Second theorem: A + B = A B A B = A + B Both used to eliminate long overbars

32 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. DeMorgan’s Theorems First theorem: Second theorem: A + B = A B A B = A + B

33 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. A + B = Y (click to see final Boolean expression) DeMorgan’s Theorems A B = Y A + B = Y Step 1: Change all ORs to ANDs and all ANDs to ORs. Step 2: Complement each individual variable (short overbar). Step 3: Complement the entire function (long overbar). Step 4: Eliminate all groups of double overbars. START > FINISHED (alternative NAND expression)

34 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ 1.The statement A B = A + B is DeMorgan’s __________ (first, second) theorem and suggests converting from a NAND to an OR situation. 2. The statement A + B = A B is DeMorgan’s __________ (first, second) theorem and suggests converting from a NOR to an AND situation. second first

35 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. PLDs Programmable Logic Device (PLD) - The generic name for an IC that can be programmed by the user to execute a complex logic function. PLDs have many inputs and outputs. PLDs can be used to implement minterm Boolean expressions using AND-OR logic. More complex PLDs have latches and other memory devices. PLDs have several advantages. PLDs are inexpensive, can be programmed by the user, and very reliable.

36 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. PLDs (continued) PLD is generic for a programmable logic device, but are also known by many other names including: PAL - programmable array logic GAL - generic array logic FPL - fuse-programmable logic PLA - programmable logic array PEEL - programmable electrically erasable logic FPGA - field programmable gate array CPLD - complex programmable logic device

37 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ 1. PLD is the generic name for a __________ (peripheral logic driver, programmable logic device) which is an IC that can solve logic problems. 2. PLDs commonly have many inputs but always have only one output. (True or False) programmable logic device False 3. PLDs have several advantages including they can be programmed in the local lab or school, are very reliable, and inexpensive. (True or False) True 4. Various manufacturers might refer to PLDs by acronyms like TTLs, CMOSs, PALs, ASCIIs, ASVABs, CPLSs, FPGAs, PEELs, or GALs. (True or False) False

38 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Programming Logic Functions using the BASIC Stamp® Module One trend in electronics is the development of programmable ICs. A second trend in electronics is the use of billions of inexpensive imbedded devices called microcontrollers. A popular microcontroller used by schools is the BASIC Stamp® module, by Parallax, Inc. BASIC Stamp® modules are programmable using a student-friendly version of B.A.S.I.C. Solving a logic problem using a microcontroller (BASIC Stamp® 2 module) is detailed on the next slide.

39 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. Using the BASIC Stamp® Module Digital Inputs A B Y1 Digital Outputs C Y2 Y3 Step 1: Write program on PC in PBASIC. Key lines of code are: Y1=(A&B&C)|(~A&~B&~C) Y2=(~A&~B)|(A&C) Y3=(~A)|(~B&C) Step 2: Download program from PC to BS2 module. Step 3: Disconnect PC from BS2 module Step 4: Power OFF and ON (BS2 module). Manipulate inputs and observe outputs. INPUTS A B C 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 RED Y1 1 0 1 GREEN Y2 1 0 1 0 1 YELLOW Y3 1 0 1 0 Truth Table Input A = LOW Input B = LOW Input C = LOW HIGH Input A = LOW Input B = LOW Input C = HIGH LOW HIGH Input A = HIGH Input B = LOW Input C = LOW LOW Logic Expressions in PBASIC: Y1= (A&B&C)|(~A&~B&~C) Y2= (~A&~B)|(A&C) Y3= (~A)|(~B&C)

40 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. QUIZ 1. The BASIC Stamp® module contains an inexpensive programmable IC called a _____. microcontroller 2. The BASIC Stamp® module is programmed using a version of B.A.S.I.C. on a _____ (modem, PC) and then downloaded into the BS2 module. PC (Personal Computer) 3. A BASIC Stamp® (such as the BS2 module) will always have many inputs but only one output. (True or False) False 4. Programming the BASIC Stamp® module is done using an easy-to-use language called _____ (PBASIC, MICRO). PBASIC

41 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. REVIEW Logic Circuit from a Boolean expression Minterm and maxterm Boolean expressions Boolean expression from a truth table Truth table from a Boolean expression Simplifying Boolean expressions Karnaugh mapping NAND logic

42 ©2008 The McGraw-Hill Companies, Inc. All rights reserved. REVIEW (continued) Data selectors and their use Solving logic problems with data selectors Using computer simulations Variations in Boolean expressions DeMorgan’s theorem PLDs (programmable logic devices) BASIC Stamp® modules


Download ppt "©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 4 Using Logic Gates Roger."

Similar presentations


Ads by Google