Lecture 9: Combinational Circuits - Wayne State...

18
Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne State University

Transcript of Lecture 9: Combinational Circuits - Wayne State...

Page 1: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Lecture 9: Combinational Circuits

Syed M. Mahmud, Ph.DECE Department

Wayne State University

Page 2: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Contents

• Decoders

• Encoders

• Multiplexers

• Implementing Boolean expression using Multiplexers

Chapter 4 ECE 2610 – Digital Logic 1 2

Page 3: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Decoders

• Converts binary information from 𝑛 input lines to a maximum of 2𝑛

unique output lines.

• 𝑛-to-𝑚 decoder -> 𝑛 input lines, 𝑚 output lines where 𝑚 ≤ 2𝑛

• Practical circuit -> BCD to seven segment decoder

Chapter 4 ECE 2610 – Digital Logic 1 3

Page 4: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Three-to-Eight Line Decoder

Chapter 4 ECE 2610 – Digital Logic 1 4

Page 5: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Decoder with Enable

• Some decoders use NAND gates only

• For control of operation, an enable input is included.

• Decoder with Enable input can also be considered as a Demultiplexer• which receives inputs from a single line and directs it to one of the 2𝑛 output

lines.

• The selection of specific line is based on the input at the 𝑛 selection lines.

Chapter 4 ECE 2610 – Digital Logic 1 5

Page 6: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

2-to-4 Line Decoder with Enable• Here, we are using

active-low enable signal, meaning when E=0, the decoder will give valid outputs.

• Also the outputs are shown in negative logic, meaning the signal on selected output line is 0 and all others are 1.

Chapter 4 ECE 2610 – Digital Logic 1 6

Page 7: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Larger Decoder Circuits• 4 × 16 decoder can be constructed using two 3 × 8 decoders.

• Here, we are using active-high enable, meaning when E=1 the outputs of the decoder will be valid. The outputs are shown in positive logic, meaning the signal on the selected output line is 1 and all others are 0.

Chapter 4 ECE 2610 – Digital Logic 1 7

Page 8: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Combinational Logic Implementation

• Full Adder Implementation

Chapter 4 ECE 2610 – Digital Logic 1 8

Page 9: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Encoders

• Inverse operation of a decoder.• Encoder has 2𝑛 or fewer input lines and 𝑛 output lines.

• If two or more inputs are active simultaneously, the output will produce an undefined combination.

Chapter 4 ECE 2610 – Digital Logic 1 9

Page 10: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Priority Encoder

Chapter 4 ECE 2610 – Digital Logic 1 10

Page 11: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Multiplexers• Selecting binary information from one of many input lines and directs

it to a single output line.

• Two-to-One line (2 × 1) Multiplexer

Chapter 4 ECE 2610 – Digital Logic 1 11

Page 12: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Four-to-One Line Multiplexer

Chapter 4 ECE 2610 – Digital Logic 1 12

Page 13: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Boolean Function Implementation

• 𝐹 = Σ 1,3,4,11,12,13,14,15• Using 16 × 1 multiplexer

• Using 8 × 1 multiplexer

• Using 4 × 1 multiplexer

• Using 2 × 1 multiplexer

Chapter 4 ECE 2610 – Digital Logic 1 13

Page 14: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Boolean Function Implementation

• 𝐹 = Σ 1,3,4,11,12,13,14,15 using 8 × 1 multiplexer

Chapter 4 ECE 2610 – Digital Logic 1 14

Page 15: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Combining MUXs

• Design a 8 × 1 MUX using 4 × 1 MUX and 2 × 1 MUX

Chapter 4 ECE 2610 – Digital Logic 1 15

Page 16: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Further Reading

• 4.12 – HDL Models of Combinational Circuits• Gate level modeling

• Hierarchical Modeling

• Number representation

• Dataflow Modeling

• 4.13 – Behavioral Modeling

• 4.14 – Writing Sample Test bench

• 4.15 – Logic Simulation

Chapter 4 ECE 2610 – Digital Logic 1 16

Page 17: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Summary

• How to design a decoder?

• How to implement logic circuits using decoder?

• What is priority encoder?

• How to design a multiplexer?

• How to implement logic circuits using multiplexer?

Chapter 4 ECE 2610 – Digital Logic 1 17

Page 18: Lecture 9: Combinational Circuits - Wayne State …webpages.eng.wayne.edu/~ad5781/ECECourses/ECE2610/...Lecture 9: Combinational Circuits Syed M. Mahmud, Ph.D ECE Department Wayne

Homework – 4 – Part b

• 4.23

• 4.26

• 4.28

• 4.31

• 4.33

Chapter 4 ECE 2610 – Digital Logic 1 18