Transcript Chapter 6

Digital Fundamentals
CHAPTER 6
Functions of Combinational Logic
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 1
Basic Adders
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 2
Half-Adder
Simple Binary Addition
0+0=0
Zero plus zero equals zero
0+1=1
Zero plus one equals one
1+0=1
One plus zero equals one
1 + 1 = 10
One plus one equals zero with a carry
of one
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 3
Half-Adder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 4
Full-Adder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 5
Full-Adder
• Full adder from two half-adder circuits
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 6
Parallel Binary Adders
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 7
Parallel Binary Adders
• Two-bit parallel binary adder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 8
Parallel Binary Adders
• Four-bit parallel binary adder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 9
Comparators
• 1-Bit Comparator
• 2-Bit Comparator
• 4-Bit Comparator
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 10
Comparators
• 1-Bit Comparator
The output is 1 when the inputs are equal
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 11
Comparators
• 2-Bit Comparator
The output is 1 when A0 = B0 AND A1 = B1
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 12
Comparators
• 4-Bit Comparator
One of three outputs will be HIGH:
• A greater than B (A > B)
• A equal to B (A = B)
• A less than B (A < B)
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 13
Decoders
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 14
Decoders
•
•
•
•
Binary decoder
4-bit decoder
BCD-to-decimal decoder
BCD-to-7-segement decoder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 15
Decoders
• Binary decoder
The output is 1 only when:
A0 = 1
A2 = 0
A3 = 0
A4 = 1
This is only one of an infinite
number of examples
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 16
Decoders
• 4-bit decoder
Logic
Diagram
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 17
Decoders
• 4-bit decoder
– Binary inputs
– Active-low
outputs
Truth
Table
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 18
Decoders
• BCD-to-decimal decoder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 19
Decoders
• BCD-to-7-segement decoder
Logic
Diagram
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 20
Decoders
• BCD-to-7-segement decoder
Truth
Table
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 21
Encoders
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 22
Encoders
• Decimal-to-BCD encoder
• 8-line-to-3-line encoder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 23
Encoders
• Decimal-to-BCD encoder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 24
Encoders
• 8-line-to-3-line encoder
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 25
Code Converters
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 26
Code Converters
• BCD-to-binary conversion
• Binary-Gray conversions
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 27
Code Converters
• BCD-to-binary conversion
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 28
Code Converters
• Binary-Gray conversions
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 29
Multiplexers (Data Selectors)
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 30
Multiplexers (Data Selectors)
• 4-input multiplexer
• Expanded multiplexers
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 31
Multiplexers (Data Selectors)
• 4-input multiplexer
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 32
Multiplexers (Data Selectors)
• Expanded multiplexers
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 33
Demultiplexers
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 34
Demultiplexers
• 2-line-to4-line demux
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 35
Parity Generator/Checker
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 36
Parity Generators/Checkers
• Parity generator/checker
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Floyd
Digital Fundamentals, 9/e
Slide 37