CprE 281: Digital Logic

Similar documents
CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

Floating Point Representation and Digital Logic. Lecture 11 CS301

MODULAR CIRCUITS CHAPTER 7

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

Slides for Lecture 19

ELCT201: DIGITAL LOGIC DESIGN

Chapter 3 Combinational Logic Design

Unit 3 Session - 9 Data-Processing Circuits

Combinational Logic. By : Ali Mustafa

Digital Logic Design ENEE x. Lecture 14

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

ECE 2300 Digital Logic & Computer Organization

Function of Combinational Logic ENT263

Combinational Logic Design Combinational Functions and Circuits

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

ECE 341. Lecture # 3

Logic Design Combinational Circuits. Digital Computer Design

Design of Sequential Circuits

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

211: Computer Architecture Summer 2016

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

Computer Science Final Examination Friday December 14 th 2001

Logic. Combinational. inputs. outputs. the result. system can

Philadelphia University Student Name: Student Number:

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Software Engineering 2DA4. Slides 8: Multiplexors and More

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

COE 202: Digital Logic Design Combinational Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

CPE100: Digital Logic Design I

Digital Logic Design. Midterm #2

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

COSC3330 Computer Architecture Lecture 2. Combinational Logic

Boolean Logic Continued Prof. James L. Frankel Harvard University

Fundamentals of Digital Design

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

CSE 20 DISCRETE MATH. Fall

CHAPTER1: Digital Logic Circuits Combination Circuits

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

CprE 281: Digital Logic

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Experiment 7: Magnitude comparators

Chapter 4 (Lect 4) Encoders Multiplexers Three-State Gates More Verilog

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Sample Test Paper - I

Boolean Algebra, Gates and Circuits

Numbers and Arithmetic

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

EGC221: Digital Logic Lab

Chapter 3 Ctd: Combinational Functions and Circuits

S C F F F T T F T T S C B F F F F F T F T F F T T T F F T F T T T F T T T

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

COMBINATIONAL LOGIC FUNCTIONS

Slide Set 6. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Chapter 4: Combinational Logic Solutions to Problems: [1, 5, 9, 12, 19, 23, 30, 33]

Introduction to Computer Engineering ECE 203

IT T35 Digital system desigm y - ii /s - iii

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

University of Toronto Faculty of Applied Science and Engineering Final Examination

Module 2. Basic Digital Building Blocks. Binary Arithmetic & Arithmetic Circuits Comparators, Decoders, Encoders, Multiplexors Flip-Flops

Systems I: Computer Organization and Architecture

UNIVERSITY OF WISCONSIN MADISON

CSC9R6 Computer Design. Practical Digital Logic

Lecture 2 Review on Digital Logic (Part 1)

COMBINATIONAL LOGIC CIRCUITS. Dr. Mudathir A. Fagiri

Written exam for IE1204/5 Digital Design with solutions Thursday 29/

CS61C : Machine Structures

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

Philadelphia University Student Name: Student Number:

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

PG - TRB UNIT-X- DIGITAL ELECTRONICS. POLYTECHNIC-TRB MATERIALS

CS61C : Machine Structures

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS

Unit 3. 2 Combinational circuits

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Chapter 3 Combinational Logic Design

Karnaugh Maps (K-Maps)

Computer organization

For smaller NRE cost For faster time to market For smaller high-volume manufacturing cost For higher performance

CSCI 220: Computer Architecture I Instructor: Pranava K. Jha. Multiplexers

Transcription:

CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/

Decoders and Encoders CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

HW 6 is due today Administrative Stuff

HW 7 is out Administrative Stuff It is due next Monday (Oct 7)

Administrative Stuff Midterm Grades are Due this Friday only grades of C-, D, F have to be submitted to the registrar s office

Quick Review

Graphical Symbol for a 2- Multiplexer s x x 2 f [ Figure 2.33c from the textbook ]

Circuit for 2- Multiplexer x s s x 2 f x x 2 f (b) Circuit (c) Graphical symbol f (s, x, x 2 ) = s x + s x 2 [ Figure 2.33b-c from the textbook ]

The Three Basic Logic Gates x x x x x x 2 2 x x x + x 2 2 NOT gate AND gate OR gate [ Figure 2.8 from the textbook ]

Building an AND Gate with 2-to- Mux x 2

Building an OR Gate with 2-to- Mux x 2

Building a NOT Gate with 2-to- Mux x x x x

Implications Any Boolean function can be implemented using only 2-to- multiplexers!

4-to- Multiplexer: Graphical Symbol and Truth Table [ Figure 4.2a-b from the textbook ]

The Three Basic Logic Gates x x x x x x 2 2 x x x + x 2 2 NOT gate AND gate OR gate [ Figure 2.8 from the textbook ]

Building an AND Gate with 4-to- Mux

Building an OR Gate with 4-to- Mux

Building a NOT Gate with 4-to- Mux x x x x Two alternative solutions.

Implications Any Boolean function can be implemented using only 4-to- multiplexers!

Using three 2-to- multiplexers to build one 4-to- multiplexer s s w w f w 2 w 3 [ Figure 4.3 from the textbook ]

6- Multiplexer s s w w 3 w 4 s 2 s 3 w 7 f w 8 w w 2 w 5 [ Figure 4.4 from the textbook ]

Synthesis of Logic Circuits Using Multiplexers

Implementation of a logic function with a 4x multiplexer w w 2 f w 2 w f [ Figure 4.6a from the textbook ]

Implementation of the same logic function with a 2x multiplexer w w 2 f w f w 2 w 2 w 2 w f (b) Modified truth table (c) Circuit [ Figure 4.6b-c from the textbook ]

The XOR Logic Gate [ Figure 2. from the textbook ]

The XOR Logic Gate [ Figure 2. from the textbook ]

Implementation of the XOR Logic Gate with a 2-to- multiplexer and one NOT f

Implementation of the XOR Logic Gate with a 2-to- multiplexer and one NOT x y f

Implementation of the XOR Logic Gate with a 2-to- multiplexer and one NOT x y f These two circuits are equivalent (the wires of the bottom AND gate are flipped)

In other words, all four of these are equivalent! x y y f x f w 2 w x y f f

Another Example (3-input XOR)

Implementation of 3-input XOR with 2-to- Multiplexers w w 2 w 3 f [ Figure 4.8a from the textbook ]

Implementation of 3-input XOR with 2-to- Multiplexers w w 2 w 3 f w 2 w 3 w 2 w 3 [ Figure 4.8a from the textbook ]

Implementation of 3-input XOR with 2-to- Multiplexers w w 2 w 3 f w 2 w 3 w 2 w 3 w 2 w 3 w f (a) Truth table (b) Circuit [ Figure 4.8 from the textbook ]

Implementation of 3-input XOR with 2-to- Multiplexers w w 2 w 3 f w 3 w 3 w 3 w 2 w f (a) Truth table (b) Circuit [ Figure 4.8 from the textbook ]

Implementation of 3-input XOR with a 4-to- Multiplexer w w 2 w 3 f [ Figure 4.9a from the textbook ]

Implementation of 3-input XOR with a 4-to- Multiplexer w w 2 w 3 f [ Figure 4.9a from the textbook ]

Implementation of 3-input XOR with a 4-to- Multiplexer w w 2 w 3 f w 3 w 3 w 3 w 3 [ Figure 4.9a from the textbook ]

Implementation of 3-input XOR with a 4-to- Multiplexer w w 2 w 3 f w 3 w 3 w 3 w 2 w w 3 f w 3 (a) Truth table (b) Circuit [ Figure 4.9 from the textbook ]

Multiplexor Synthesis Using Shannon s Expansion

Three-input majority function w w 2 w 3 f [ Figure 4.a from the textbook ]

Three-input majority function w w 2 w 3 f w f [ Figure 4.a from the textbook ]

Three-input majority function w w 2 w 3 f w f w 2 w 3 w 2 + w 3 [ Figure 4.a from the textbook ]

Three-input majority function w w 2 w 3 f w f w 2 w 3 w 2 + w 3 (b) Truth table w w 2 w 3 f (b) Circuit [ Figure 4.a from the textbook ]

Three-input majority function w w 2 w 3 f

Shannon s Expansion Theorem Any Boolean function can be rewritten in the form:

Shannon s Expansion Theorem Any Boolean function can be rewritten in the form:

Shannon s Expansion Theorem Any Boolean function can be rewritten in the form: cofactor cofactor

Shannon s Expansion Theorem (Example)

Shannon s Expansion Theorem (Example) (w + w )

Shannon s Expansion Theorem (Example) (w + w )

Shannon s Expansion Theorem (In terms of more than one variable) This form is suitable for implementation with a 4x multiplexer.

Another Example

Factor and implement the following function with a 2x multiplexer

Factor and implement the following function with a 2x multiplexer

Factor and implement the following function with a 2x multiplexer w f [ Figure 4.a from the textbook ]

Factor and implement the following function with a 4x multiplexer

Factor and implement the following function with a 4x multiplexer

Factor and implement the following function with a 4x multiplexer [ Figure 4.b from the textbook ]

Yet Another Example

Factor and implement the following function using only 2x multiplexers

Factor and implement the following function using only 2x multiplexers

Factor and implement the following function using only 2x multiplexers

Factor and implement the following function using only 2x multiplexers w g h f

Factor and implement the following function using only 2x multiplexers

Factor and implement the following function using only 2x multiplexers

Factor and implement the following function using only 2x multiplexers w 2 w 2 w 3 g w 3 h

Finally, we are ready to draw the circuit w 2 w 3 w 2 g g h w f w 3 h

Finally, we are ready to draw the circuit w 2 w 3 g w f h

Finally, we are ready to draw the circuit w 2 w w 3 f [ Figure 4.2 from the textbook ]

Decoders

2-to-4 Decoder (Definition) Has two inputs: w and w Has four outputs: y, y, y 2, and y 3 If w = and w =, then the output y is set to If w = and w =, then the output y is set to If w = and w =, then the output y 2 is set to If w = and w =, then the output y 3 is set to Only one output is set to. All others are set to.

Truth Table and Graphical Symbol for a 2-to-4 Decoder [ Figure 4.3a-b from the textbook ]

Truth Logic Circuit for a 2-to-4 Decoder [ Figure 4.3c from the textbook ]

Adding an Enable Input [ Figure 4.3c from the textbook ]

Adding an Enable Input En [ Figure 4.3c from the textbook ]

Truth Table and Graphical Symbol for a 2-to-4 Decoder with an Enable Input [ Figure 4.4a-b from the textbook ]

Truth Table and Graphical Symbol for a 2-to-4 Decoder with an Enable Input x indicates that it does not matter what the value of this variable is for this row of the truth table [ Figure 4.4a-b from the textbook ]

Graphical Symbol for a Binary n-to-2 n Decoder with an Enable Input A binary decoder with n inputs has 2 n outputs The outputs of an enabled binary decoder are one-hot encoded, meaning that only a single bit is set to, i.e., it is hot. [ Figure 4.4d from the textbook ]

How can we build larger decoders? 3-to-8? 4-to-6? 5-to-??

Hint: How did we build a 6- Multiplexer s s w w 3 w 4 s 2 s 3 w 7 f w 8 w w 2 w 5 [ Figure 4.4 from the textbook ]

A 3-to-8 decoder using two 2-to-4 decoders w y w y w w 2 w y y 2 En y 3 y y 2 y 3 En w y y 4 w y y 2 En y 3 y 5 y 6 y 7 [ Figure 4.5 from the textbook ]

A 3-to-8 decoder using two 2-to-4 decoders w y w y w w 2 w y y 2 En y 3 y y 2 y 3 En w y y 4 w y y 2 En y 3 y 5 y 6 y 7 What is this? [ Figure 4.5 from the textbook ]

What is this? w y En y

A 4-to-6 decoder built using a decoder tree w w y y w w y y En y 2 y 3 y 2 y 3 w 2 w 3 En w y w y En y 2 y 3 w w y En y 2 y 3 w y y w w y En y 2 y 3 y 4 y 5 y 6 y 7 y 8 y 9 y y [ Figure 4.6 from the textbook ] w y w y En y 2 y 3 y 2 y 3 y 4 y 5

Let s build a 5-to-32 decoder

Let s build a 5-to-32 decoder y y 5 En y 6 y 3

Let s build a 5-to-32 decoder w w w 2 w 3 y y 5 w 4 En w w w 2 w 3 y 6 y 3

Demultiplexers

-to-4 Demultiplexer (Definition) Has one data input line: D Has two output select lines: w and w Has four outputs: y, y, y 2, and y 3 If w = and w =, then the output y is set to D If w = and w =, then the output y is set to D If w = and w =, then the output y 2 is set to D If w = and w =, then the output y 3 is set to D Only one output is set to D. All others are set to.

A -to-4 demultiplexer built with a 2-to-4 decoder [ Figure 4.4c from the textbook ]

A -to-4 demultiplexer built with a 2-to-4 decoder output select lines the four output lines data input line D [ Figure 4.4c from the textbook ]

Multiplexers (Implemented with Decoders)

A 4-to- multiplexer built using a 2-to-4 decoder w w s s w y w y En y 2 y 3 w 2 f w 3 [ Figure 4.7 from the textbook ]

Encoders

Binary Encoders

A 2 n -to-n binary encoder 2 n inputs w w 2 n y y n n outputs [ Figure 4.8 from the textbook ]

A 4-to-2 binary encoder w 3 w 2 w w y y (a) Truth table w w y w 2 w 3 y (b) Circuit [ Figure 4.9 from the textbook ]

A 4-to-2 binary encoder w 3 w 2 w w y y (a) Truth table w? w y w 2 w 3 y (b) Circuit [ Figure 4.9 from the textbook ]

A 4-to-2 binary encoder w 3 w 2 w w y y (a) Truth table w It is assumed that the inputs are one hot encoded w y w 2 w 3 y (b) Circuit [ Figure 4.9 from the textbook ]

Priority Encoders

d w y d y z x x x w x x w 2 x w 3 [ Figure 4.2 from the textbook ] Truth table for a 4-to-2 priority encoder

Questions?

THE END