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

This form sometimes used in logic circuit, example:

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

CS 226: Digital Logic Design

211: Computer Architecture Summer 2016

Boolean Algebra and Logic Simplification

Logic Design. Chapter 2: Introduction to Logic Circuits

CprE 281: Digital Logic

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

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

WEEK 2.1 BOOLEAN ALGEBRA

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

CSE 140 Midterm I - Solution

Lecture 2 Review on Digital Logic (Part 1)

Chapter 7 Logic Circuits

Logic Design I (17.341) Fall Lecture Outline

Computer Science Final Examination Friday December 14 th 2001

Combinatorial Logic Design Principles

Digital Logic Design. Combinational Logic

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

EEE130 Digital Electronics I Lecture #4

CHAPTER1: Digital Logic Circuits Combination Circuits

University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Midterm Examination

Number System conversions

Digital Circuit And Logic Design I. Lecture 4

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

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Simplifying Logic Circuits with Karnaugh Maps

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

Review for Test 1 : Ch1 5

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

Unit 2 Session - 6 Combinational Logic Circuits

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CPE100: Digital Logic Design I

Digital Logic (2) Boolean Algebra

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Chapter 2 Combinational Logic Circuits

Chapter 4 Optimized Implementation of Logic Functions

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

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

MC9211 Computer Organization

Why digital? Overview. Number Systems. Binary to Decimal conversion

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

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

CPE100: Digital Logic Design I

ENG2410 Digital Design Combinational Logic Circuits

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Combinational Logic Circuits Part II -Theoretical Foundations

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

Chapter 2 Combinational Logic Circuits

Standard Expression Forms

MODULAR CIRCUITS CHAPTER 7

ELCT201: DIGITAL LOGIC DESIGN

1 Boolean Algebra Simplification

University of Florida EEL 3701 Fall 1996 Dr. Eric M. Schwartz

Chapter 2 Combinational Logic Circuits

Lecture 2. Notes. Notes. Notes. Boolean algebra and optimizing logic functions. BTF Electronics Fundamentals August 2014

University of Florida EEL 3701 Summer 2015 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Tuesday, 30 June 2015

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

Combinational Logic Fundamentals

Numbers and Arithmetic

Gate-Level Minimization

Administrative Notes. Chapter 2 <9>

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

CSE 140, Lecture 2 Combinational Logic CK Cheng CSE Dept. UC San Diego

Logic Design Combinational Circuits. Digital Computer Design

Chapter 2 Combinational Logic Circuits

Cs302 Quiz for MID TERM Exam Solved

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

CprE 281: Digital Logic

Minimization techniques

Slides for Lecture 19

Combinational Logic. By : Ali Mustafa

Chapter-2 BOOLEAN ALGEBRA

Boolean Algebra and Digital Logic

Chapter 2: Switching Algebra and Logic Circuits

Combinational Logic. Review of Combinational Logic 1

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Introduction to Digital Logic Missouri S&T University CPE 2210 Karnaugh Maps

CHAPTER III BOOLEAN ALGEBRA

Introduction to Karnaugh Maps

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Transcription:

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

Examples of Solved Problems CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

Administrative Stuff HW5 is out It is due on Monday Oct 2 @ 4pm. Please write clearly on the first page (in block capital letters) the following three things: Your First and Last Name Your Student ID Number Your Lab Section Letter Also, staple all of your pages together

Administrative Stuff No homework is due next week.

Midterm Exam # Administrative Stuff When: Friday Sep 22. Where: This classroom What: Chapter and Chapter 2 plus number systems The exam will be open book and open notes (you can bring up to 3 pages of handwritten notes).

Topics for the Midterm Exam Binary Numbers Octal Numbers Hexadecimal Numbers Conversion between the different number systems Truth Tables Boolean Algebra Logic Gates Circuit Synthesis with AND, OR, NOT Circuit Synthesis with NAND, NOR Converting an AND/OR/NOT circuit to NAND circuit Converting an AND/OR/NOT circuit to NOR circuit SOP and POS expressions

Topics for the Midterm Exam Mapping a Circuit to Verilog code Mapping Verilog code to a circuit Multiplexers Venn Diagrams K-maps for 2, 3, and 4 variables Minimization of Boolean expressions using theorems Minimization of Boolean expressions with K-maps Incompletely specified functions (with don t cares) Functions with multiple outputs

Example Determine if the following equation is valid

?

? LHS RHS

Left-Hand Side (LHS)

Left-Hand Side (LHS)

Left-Hand Side (LHS)

Right-Hand Side (RHS)

Right-Hand Side (RHS)

Right-Hand Side (RHS)

? LHS RHS They are equal.

Example 2 Design the minimum-cost product-of-sums expression for the function f(x, x 2, x 3 ) = Σ m(0, 2, 4, 5, 6, 7)

Minterms and Maxterms (with three variables) [ Figure 2.22 from the textbook ]

Minterms and Maxterms (with three variables) The function is for these rows

Minterms and Maxterms (with three variables) The function is for these rows The function is 0 for these rows

Two different ways to specify the same function f of three variables f(x, x 2, x 3 ) = Σ m(0, 2, 4, 5, 6, 7) f(x, x 2, x 3 ) = Π M(, 3)

The POS Expression f(x, x 2, x 3 ) = Π M(, 3) = M M 3 = ( x + x 2 + x 3 )( x + x 2 + x 3 )

The Minimum POS Expression f(x, x 2, x 3 ) = ( x + x 2 + x 3 )( x + x 2 + x 3 ) = ( x + x 3 + x 2 )( x + x 3 + x 2 ) = ( x + x 3 ) Hint: Use the following Boolean Algebra theorem

Alternative Solution Using K-Maps x 0 x 2 x 3 0 0 m 0 x x 2 x 3 00 0 0 0 0 0 0 m m 2 0 m 0 m 2 m 6 m 4 0 0 0 m 3 m 4 m m 3 m 7 m 5 0 m 5 (b) Karnaugh map 0 m 6 m 7 (a) Truth table

Alternative Solution Using K-Maps x 0 x 2 x 3 0 0 m 0 x x 2 x 3 00 0 0 0 0 0 0 m m 2 0 m 0 m 2 m 6 m 4 0 0 0 m 3 m 4 m m 3 m 7 m 5 0 m 5 (b) Karnaugh map 0 m 6 m 7 (a) Truth table

Alternative Solution Using K-Maps x 0 x 2 x 3 0 0 m 0 x x 2 x 3 00 0 0 0 0 0 0 m m 2 0 m 0 m 2 m 6 m 4 0 0 0 m 3 m 4 m m 3 m 7 m 5 0 m 5 (b) Karnaugh map 0 m 6 m 7 (a) Truth table

Alternative Solution Using K-Maps

Alternative Solution Using K-Maps 0 0

Alternative Solution Using K-Maps 0 0 ( x + x 3 )

Example 3

Condition A

Condition A

Condition B

Condition B

Condition C

Condition C

The output of the circuit can be expressed as f = AB + AC + BC

The output of the circuit can be expressed as f = AB + AC + BC

The output of the circuit can be expressed as f = AB + AC + BC

Finally, we get

Example 4 Solve the previous problem using Venn diagrams.

Venn Diagrams (find the areas that are shaded at least two times) x x 2 x x 2 x 3 x 3 (a) Function A: (b) Function B x x 2 x x 2 x 3 x 3 (c) Function C (d) Function f [ Figure 2.66 from the textbook ]

Example 5 Design the minimum-cost SOP and POS expression for the function f(x, x 2, x 3, x 4 ) = Σ m(4, 6, 8, 0,, 2, 5) + D(3, 5, 7, 9)

Let s Use a K-Map f(x, x 2, x 3, x 4 ) = Σ m(4, 6, 8, 0,, 2, 5) + D(3, 5, 7, 9) x x x 2 x 3 x 4 00 0 0 00 m 0 m 4 m 2 m 8 0 m m 5 m 3 m 9 x 3 0 m 3 m 2 m 6 m 7 m 5 m 4 m m 0 x 4 x 2

Let s Use a K-Map f(x, x 2, x 3, x 4 ) = Σ m(4, 6, 8, 0,, 2, 5) + D(3, 5, 7, 9) x x x 2 x 3 x 4 00 0 0 00 0 m 0 m 4 m 2 m 8 x 3 0 0 m m 5 0 m 3 d m 2 m 6 0 d m 3 m 7 m 5 d 0 m 4 0 m 9 d m m 0 x 4 x 2

The SOP Expression [ Figure 2.67a from the textbook ]

What about the POS Expression? f(x, x 2, x 3, x 4 ) = Σ m(4, 6, 8, 0,, 2, 5) + D(3, 5, 7, 9) x x x 2 x 3 x 4 00 0 0 00 0 m 0 m 4 m 2 m 8 x 3 0 0 m m 5 0 m 3 d m 2 m 6 0 d m 3 m 7 m 5 d 0 m 4 0 m 9 d m m 0 x 4 x 2

The POS Expression [ Figure 2.67b from the textbook ]

Example 6 Use K-maps to find the minimum-cost SOP and POS expression for the function

Let s map the expression to the K-Map x x x 2 x 3 x 4 00 0 0 00 m 0 m 4 m 2 m 8 0 m m 5 m 3 m 9 x 3 0 m 3 m 2 m 6 m 7 m 5 m 4 m m 0 x 4 x 2

Let s map the expression to the K-Map x x x 2 x 3 x 4 00 0 0 00 m 0 d m 4 m 2 m 8 x 3 0 0 m m 5 m 3 m 2 m 6 m 3 m 7 m 5 m 4 d m 9 d m m 0 x 4 x 2

Let s map the expression to the K-Map x x x 2 x 3 x 4 00 0 0 00 m 0 d m 4 m 2 m 8 x 3 0 0 m m 5 m 3 m 2 m 6 m 3 m 7 m 5 m 4 d m 9 d m m 0 x 4 x 2

The SOP Expression [ Figure 2.68a from the textbook ]

What about the POS Expression? x x x 2 x 3 x 4 00 0 0 00 m 0 m 4 m 2 d m 8 0 x 3 0 0 m m 5 m 3 m 2 m 6 0 0 m 3 m 7 m 5 0 m 4 d m 9 d m m 0 0 x 4 x 2

The POS Expression [ Figure 2.68b from the textbook ]

Example 7 Derive the minimum-cost SOP expression for

First, expand the expression using property 2a

Construct the K-Map for this expression x x 2 x 3 s s 2 s 3 s s 2 0 0 0 0 0 0 0 0 0 0 0 0 m 0 m m 2 m 3 m 4 m 5 m 6 m 7 x x 2 x 3 00 0 0 s 3 0 m 0 m m 3 m 2 m 6 (b) Karnaugh map m 4 m 7 m 5 (a) Truth table

Construct the K-Map for this expression [ Figure 2.69 from the textbook ]

Construct the K-Map for this expression Simplified Expression: f = s 3 + s s 2 [ Figure 2.69 from the textbook ]

Example 8 Write the Verilog code for the following circuit

[ Figure 2.70 from the textbook ] Logic Circuit

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

Logic Circuit vs Verilog Code [ Figure 2.70 from the textbook ] [ Figure 2.7 from the textbook ]

Example 9 Write the Verilog code for the following circuit

The Logic Circuit for this Example [ Figure 2.72 from the textbook ]

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

Addition of Binary Numbers

Logic Circuit vs Verilog Code [ Figure 2.73 from the textbook ]

Some material form Appendix B

Programmable Logic Array (PLA) x x 2 x n Input buffers and inverters x x x n x n P AND plane P k OR plane [ Figure B.25 from textbook ] f f m

Gate-Level Diagram of a PLA x x 2 x 3 Programmable connections P OR plane P 2 P 3 P 4 AND plane [ Figure B.26 from textbook ] f f 2

Customary Schematic for PLA x x 2 x 3 P OR plane P 2 P 3 P 4 AND plane [ Figure B.27 from textbook ] f f 2

Programmable Array Logic (PAL) x x 2 x 3 P P 2 f P 3 P 4 f 2 AND plane [ Figure B.28 from textbook ]

Programmable Array Logic (PAL) x x 2 x 3 P P 2 f P 3 P 4 f 2 [ Figure B.28 from textbook ] AND plane Only the AND plane is programmable. The OR plane is fixed.

Questions?

THE END