Digital Electronics Principles Applications Seventh Edition Roger L

  • Slides: 37
Download presentation
Digital Electronics Principles & Applications Seventh Edition Roger L. Tokheim Chapter 3 Logic Gates

Digital Electronics Principles & Applications Seventh Edition Roger L. Tokheim Chapter 3 Logic Gates © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

INTRODUCTION • The AND Gate • The OR Gate • The Inverter • The

INTRODUCTION • The AND Gate • The OR Gate • The Inverter • The NAND Gate • The NOR Gate • The XNOR Gate • NAND as Universal Gate • Gates with More Than Two Inputs • Using Inverters to Convert Gates • TTL & CMOS Gates • Troubleshooting Gating Circuits • IEEE Logic Symbols • Logic Functions using Software © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • “All or Nothing Gate” • Boolean Expression: A · B = Y

• “All or Nothing Gate” • Boolean Expression: A · B = Y • Truth Table (See next slide) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Truth Table - AND Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights

Truth Table - AND Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ What is the output of the AND gate? L L L H ?

QUIZ What is the output of the AND gate? L L L H ? Low H H H ? High ? Low L Unique Output: Output HIGH only when all inputs are HIGH. © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • “Any or All Gate” • Boolean Expression: A + B = Y

• “Any or All Gate” • Boolean Expression: A + B = Y • Truth Table (See next slide) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Truth Table - OR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights

Truth Table - OR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ What is the output of the OR gate? H ? High H H

QUIZ What is the output of the OR gate? H ? High H H L L ? Low H ? High Unique Output: Output LOW only when all inputs are LOW. © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • NOT Circuit • Gives output that is not the same as the

• NOT Circuit • Gives output that is not the same as the input. • Boolean Expression: Y = A or Y = A‘ • Double inverting: A = A • NOT gate inverts, or complements, or negates © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. If the input to an inverter is LOW, the output will be

QUIZ 1. If the input to an inverter is LOW, the output will be _____. HIGH 2. If the input to an inverter is HIGH, the output will be _____. LOW 3. A NOT gate is said to invert, to negate or to complement the input. (True or False) True 4. A NOT gate is also called commonly called a(n) _____ (AND gate, inverter). inverter © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • NOT AND or inverted AND function. • Boolean Expression: or A ·

• NOT AND or inverted AND function. • Boolean Expression: or A · B = Y (A · B)' = Y • Truth Table (See next slide) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Truth Table - NAND Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights

Truth Table - NAND Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ What is the output of the NAND gate? L ? High L L

QUIZ What is the output of the NAND gate? L ? High L L H H ? Low L ? High Unique Output: Output LOW only when all inputs are HIGH. © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • NOT OR or Inverted OR • Boolean Expression: A + B =

• NOT OR or Inverted OR • Boolean Expression: A + B = Y or (A + B)' = Y • Truth Table (See next slide) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Truth Table - NOR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights

Truth Table - NOR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ What is the output of the NOR gate? L ? High L L

QUIZ What is the output of the NOR gate? L ? High L L H H H L ? Low H Unique Output: Output HIGH when all inputs are LOW. © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • Known as “Exclusive OR” Gate • “Anything but not all” Gate •

• Known as “Exclusive OR” Gate • “Anything but not all” Gate • Boolean Expression: A B=Y • Truth Table (See next slide) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Truth Table - XOR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights

Truth Table - XOR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ What is the output from the XOR gate? L L L H H

QUIZ What is the output from the XOR gate? L L L H H H ? ? Low L L H ? High H H L ? ? Low XOR output is HIGH only when odd number of inputs are HIGH © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

 • Known as the Exclusive NOR Gate • The Inverted XOR • Boolean

• Known as the Exclusive NOR Gate • The Inverted XOR • Boolean Expression: A B=Y or (A B)' = Y • Truth Table (See next slide) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Truth Table - XNOR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights

Truth Table - XNOR Gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ What is the output from this XNOR gate? L L L H H

QUIZ What is the output from this XNOR gate? L L L H H L ? High L H L ? Low ? High H H H ? Low XNOR output is HIGH only when odd number of inputs are LOW © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

The NAND as a Universal Gate • “Universal gate” can be used in combination

The NAND as a Universal Gate • “Universal gate” can be used in combination to create any other logic function. Shorting NAND inputs Yields the NOT logic function • Example: A+B Equal to the OR logic function © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. NAND gates can be wired together to convert to other logic functions

QUIZ 1. NAND gates can be wired together to convert to other logic functions (True or False). 2. These two NAND gates wired together will produce the ______ (AND, XOR) logic function. True AND © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Using Inverters to Convert Gates For example: © 2008 The Mc. Graw-Hill Companies, Inc.

Using Inverters to Convert Gates For example: © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. This combination of gates will generate the ______ (NAND, OR) logic function.

QUIZ 1. This combination of gates will generate the ______ (NAND, OR) logic function. NAND 2. This combination of gates will generate the ______ (AND, OR) logic function. AND © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Practical Logic Gates • ICs - Integrated Circuit Form • TTL Family of ICs

Practical Logic Gates • ICs - Integrated Circuit Form • TTL Family of ICs • CMOS Family of ICs • TTL = Transistor-Transistor Logic • CMOS = Complementary Metal Oxide Semiconductor © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. Practical logic gates (AND-, OR-, NAND-, NOT-gates) are packaged in _____ form.

QUIZ 1. Practical logic gates (AND-, OR-, NAND-, NOT-gates) are packaged in _____ form. 2. Two popular families of ICs used to manufacture logic gate ICs are _____. 3. In digital electronics, TTL commonly refers to a family of ICs. TTL stands for _____. 4. In digital electronics, logic gates are manufactured using either TTL or _____ technology. IC TTL and CMOS transistor-transistor logic CMOS © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Troubleshooting Simple Gate Circuits • Logic probe - equipment used to test circuits •

Troubleshooting Simple Gate Circuits • Logic probe - equipment used to test circuits • Feel top of IC to determine if it is hot • Look for broken connections, signs of excessive heat • Smell for overheating • Check power source • Trace path of logic through circuit © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. A simple hand-held instrument called a _____ (logic probe, oscilloscope) can be

QUIZ 1. A simple hand-held instrument called a _____ (logic probe, oscilloscope) can be used for troubleshooting simple logic gate circuits. 2. The first three steps in troubleshooting are to use your senses to (1) feel the top of the ICs for overheating, (2) look for broken connections, and (3) _____ for signs of overheating. 3. The fourth step in troubleshooting is to use a logic probe to check the power sources. (True or False) logic probe smell True © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

IEEE Logic Symbols • A different set of symbols without unique shapes. • Not

IEEE Logic Symbols • A different set of symbols without unique shapes. • Not very popular at this time. Examples: A B & Y AND gate 1 Y OR gate © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Programming Logic Functions using the BASIC Stamp® Module • One trend in electronics is

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 a billions of inexpensive embedded devices called microcontrollers. • A popular microcontroller used extensively by schools is the BASIC Stamp® module by Parallax, Inc. • BASIC Stamp® modules are programmed using a student -friendly version of B. A. S. I. C. • Programming of the BASIC Stamp® is done on a PC. The program is downloaded into the BASIC Stamp®. The downloaded programmed is then held in the BASIC Stamp® module’s memory. The program starts at the beginning each time power to the module is turned on. © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. The BASIC Stamp® module contains a programmable device called a _____. microcontroller

QUIZ 1. The BASIC Stamp® module contains a programmable device called a _____. microcontroller 2. Programming for the BASIC Stamp® is done on a _____ (cell phone, PC) and then downloaded into the module’s memory. 3. A microcontroller is an inexpensive programmable device that is commonly embedded in everyday appliances, etc. (True or False) PC True © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

Using the BASIC Stamp® Module Step 1: Program the BS 2 module using in

Using the BASIC Stamp® Module Step 1: Program the BS 2 module using in PBASIC language. The key line Step 3: Disconnect PC. of code is: Y=A&B which represents AB=Y or input A ANDed with input B. Step 2: Download the PBASIC program frompower the PC to the Step 4: Turn OFF and then ON. BASIC Stamp® module. The program will 2 start at the beginning. Observe the outputs with different inputs. Digital Inputs A Input AA==HIGH Input LOW Input A = HIGH Input B = LOW B Digital Output Y HIGH LOW © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

PBASIC Code for Logic Functions Logic Function AND OR NOT NAND NOR XNOR PBASIC

PBASIC Code for Logic Functions Logic Function AND OR NOT NAND NOR XNOR PBASIC code for BS 2 Y=A&B Y=A|B Y = ~A Y = ~(A & B) Y = ~(A | B) Y=A^B Y = ~(A ^ B) © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

QUIZ 1. What is the PBASIC code used when programming the BASIC Stamp® module

QUIZ 1. What is the PBASIC code used when programming the BASIC Stamp® module for the 2 -input OR logic function? 2. What is the PBASIC code used when programming the BASIC Stamp® module for the 2 -input NAND logic function? Y 3. What is the PBASIC code used when programming the BASIC Stamp® module for the 2 -input XOR logic function? Y=A|B = ~(A & B) Y=A^B © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.

REVIEW • The AND Gate • The OR Gate • The Inverter • The

REVIEW • The AND Gate • The OR Gate • The Inverter • The NAND Gate • The NOR Gate • The XNOR Gate • NAND as Universal Gate • Gates with More Than Two Inputs • Using Inverters to Convert Gates • TTL & CMOS Gates • Troubleshooting Gating Circuits • IEEE Logic Symbols • Logic Functions using Software © 2008 The Mc. Graw-Hill Companies, Inc. All rights reserved.