Digital Logic Design Chapter 3 Logic Gates
Logic Gates
Inverter
AND Gate
OR Gate
Exclusive-OR Gate
NAND Gate
NOR Gate
Exclusive-NOR Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 2
The Inverter
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 3
The Inverter
The inverter performs the Boolean
NOT operation. When the input is LOW, the output is HIGH; when the input is HIGH, the output is LOW.
Pulsed waveforms Truth table 0 = LOW 1 = HIGH
Boolean expression
The output of an inverter is always the complement (opposite) of the input.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 4
The AND Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 5
The AND Gate
The AND gate produces a HIGH output when all inputs are HIGH; otherwise, the output is LOW.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 6
The AND Gate The AND operation is usually shown with a dot between the variables but it may be implied (no dot). Thus, the AND operation is written as X = A .B or X = AB.
Boolean expression Truth table 0 = LOW 1 = HIGH
Pulsed waveforms
The output of an AND gate is HIGH only when all inputs are HIGH.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 7
The AND Gate
3-Input AND Gate
4-Input AND Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 8
The AND Gate The AND operation is used in computer programming as a selective mask If you want to retain certain bits of a binary number but reset the other bits to 0, you could set a mask with 1’s in the position of the retained bits. Example: If the binary number 10100011 is ANDed with the mask 00001111, what is the result? 00000011
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 9
The AND Gate
A common application of the AND gate is to enable (that is, to allow) the age of a signal (pulse waveform) from one point to another at certain times and to inhibit (prevent) the age at other times.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 10
The OR Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 11
The OR Gate
The OR gate produces a HIGH output if any input is HIGH; if all inputs are LOW, the output is LOW.
The OR operation is shown with a plus sign (+) between the variables. Thus, the OR operation is written as X = A + B
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 12
The OR Gate
Boolean expression Truth table 0 = LOW 1 = HIGH
Pulsed waveforms
The output of an OR gate is HIGH whenever one or more inputs are HIGH Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 13
The OR Gate
3-Input OR Gate
4-Input OR Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 14
The OR Gate
The OR operation can be used in computer programming to set certain bits of a binary number to 1. Example: ASCII letters have a 1 in the bit 5 position for lower case letters and a 0 in this position for capitals. (Bit positions are numbered from right to left starting with 0.) What will be the result if you OR an ASCII letter with the 8-bit mask 00100000? The resulting letter will be lower case
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 15
The OR Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 16
The NAND Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 17
The NAND Gate
The NAND gate produces a LOW output when all inputs are HIGH; otherwise, the output is HIGH.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 18
The NAND Gate
Boolean expression Truth table 0 = LOW 1 = HIGH
Pulsed waveforms
The output of a NAND gate is HIGH whenever one or more inputs are LOW. Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 19
The NAND Gate
3-Input NAND Gate
4-Input NAND Gate
The NAND gate is particularly useful because it is a “universal” gate – all other basic gates can be constructed from NAND gates.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 20
The NOR Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 21
The NOR Gate
The NOR gate produces a LOW output if any input is HIGH; if all inputs are HIGH, the output is LOW.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 22
The NOR Gate
Boolean expression Truth table 0 = LOW 1 = HIGH
Pulsed waveforms
The output of a NOR gate is LOW whenever one or more inputs are HIGH. Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 23
The NOR Gate
3-Input NOR Gate
4-Input NOR Gate
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 24
Exclusive-OR and Exclusive-NOR Gates
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 25
Exclusive-OR Gate
The XOR gate produces a HIGH output only when both inputs are at opposite logic levels.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 26
Exclusive-OR Gate
Boolean expression Truth table 0 = LOW 1 = HIGH
Pulsed waveforms
The output of an XOR gate is HIGH whenever the two inputs are different. Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 27
Exclusive-OR Gate Question: If the A and B waveforms are both inverted for the above waveforms, how is the output affected?
There is no change in the output.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 28
Exclusive-NOR Gate The XNOR gate produces a HIGH output only when both inputs are at the same logic level.
Boolean expression Truth table 0 = LOW 1 = HIGH
Pulsed waveforms
The output of an XNOR gate is HIGH whenever the two inputs are identical. Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 29
Exclusive-NOR Gate
Notice that the XNOR gate will produce a HIGH when both inputs are the same. This makes it useful for comparison functions.
Question: If
the A waveform is inverted but B remains the same, how is the output affected? The output will be inverted. Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 30
Recommended Readings
Example 3-13
Example 3-18
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 31
Fixed-Function Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 32
Fixed Function Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 33
Fixed Function Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 34
Fixed Function Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 35
Fixed Function Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 36
Programmable Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 37
Programmable Logic
A Programmable Logic Device (PLD) can be programmed to implement logic. There are various technologies available for PLDs. Many use an internal array of AND gates to form logic . Many PLDs can be programmed multiple times.
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 38
Programmable Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 39
Programmable Logic
Floyd Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
Slide 40