Digital Circuit And Logic Design I. Lecture 4

Similar documents
Digital Circuit And Logic Design I. Lecture 3

Week-I. Combinational Logic & Circuits

14:332:231 DIGITAL LOGIC DESIGN

Unit 2 Session - 6 Combinational Logic Circuits

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

CS/EE 181a 2010/11 Lecture 4

Digital Logic Design. Combinational Logic

Gate-Level Minimization

Optimizations and Tradeoffs. Combinational Logic Optimization

Combinational Logic Fundamentals

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

CS/EE 181a 2008/09 Lecture 4

Combinatorial Logic Design Principles

UNIT 5 KARNAUGH MAPS Spring 2011

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

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

Simplifying Logic Circuits with Karnaugh Maps

Chapter 4 Optimized Implementation of Logic Functions

Karnaugh Maps Objectives

DIGITAL ELECTRONICS & it0203 Semester 3

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

CSE 140: Components and Design Techniques for Digital Systems

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

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

ELC224C. Karnaugh Maps

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

Logical Design of Digital Systems

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

Chap 2. Combinational Logic Circuits

ENG2410 Digital Design Combinational Logic Circuits

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

ELCT201: DIGITAL LOGIC DESIGN

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

This form sometimes used in logic circuit, example:

Contents. Chapter 3 Combinational Circuits Page 1 of 36

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

Number System conversions

Midterm1 Review. Jan 24 Armita

Combinational Logic Circuits Part II -Theoretical Foundations

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Combinational Logic Design Principles

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

CHAPTER 5 KARNAUGH MAPS

Working with Combinational Logic. Design example: 2x2-bit multiplier

Unit 6. Quine-McClusky Method. Unit 6 1

CHAPTER III BOOLEAN ALGEBRA

Lecture 4: Four Input K-Maps

Lecture 7: Karnaugh Map, Don t Cares

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Logic Design I (17.341) Fall Lecture Outline

CHAPTER III BOOLEAN ALGEBRA

WEEK 3.1 MORE ON KARNAUGH MAPS

Logic Design. Chapter 2: Introduction to Logic Circuits

Minimization techniques

211: Computer Architecture Summer 2016

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

CprE 281: Digital Logic

MC9211 Computer Organization

Chapter 2 Boolean Algebra and Logic Gates

COMBINATIONAL LOGIC FUNCTIONS

MODULAR CIRCUITS CHAPTER 7

Chapter 2 Boolean Algebra and Logic Gates

COM111 Introduction to Computer Engineering (Fall ) NOTES 6 -- page 1 of 12

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

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

Standard Expression Forms

EC-121 Digital Logic Design

Review for Test 1 : Ch1 5

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

Boolean Algebra and Logic Simplification

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

Combinational Logic Design/Circuits

Chapter 2. Boolean Algebra and Logic Gates

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

Chapter 3. Boolean Algebra. (continued)

Digital Logic Design ENEE x. Lecture 12

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

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

EEE130 Digital Electronics I Lecture #4

Systems I: Computer Organization and Architecture

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

CS 226: Digital Logic Design

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

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

Chapter 2 Combinational Logic Circuits

Digital Logic Circuits - Switching Algebra - Combinational Circuits -

Introduction to Karnaugh Maps

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Chapter 2 Boolean Algebra and Logic Gates

Boolean Algebra, Gates and Circuits

UNIT 1. BOOLEAN ALGEBRA AND COMBINATIONAL CIRCUITS

Theorem/Law/Axioms Over (.) Over (+)

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

Transcription:

Digital Circuit And Logic Design I Lecture 4

Outline Combinational Logic Design Principles (2) 1. Combinational-circuit minimization 2. Karnaugh maps 3. Quine-McCluskey procedure Panupong Sornkhom, 2005/2 2

Combinational Logic Design Principles (2)

1. Combinational-circuit minimization The complexity of a logic circuit is a function of the number of gates in the circuit. The complexity of a gate generally is a function of number of inputs to it. Reducing the number of literals in the Boolean function should reduce the number of inputs to each gate and the number of gates in the circuit However, various other criteria are used in circuit minimization. For instance, in the design of ICs, minimizing the area used by the circuit on the silicon wafer is important In the design of logic circuit using ICs, reducing number of ICs in the circuit means reducing cost of the circuit Panupong Sornkhom, 2005/2 4

1. Combinational-circuit minimization (cont.) Nevertheless, we will concentrate here on the Boolean function-minimization procedures that reduce the literals count in the function The minimization methods reduce the cost of two-level AND- OR, OR-AND, NAND-NAND, or NOR-NOR circuit in three ways By minimizing the number of first-level gates By minimizing the number of inputs on each first-level gate By minimizing the number of inputs on the second-level gate. This is actually a side effect of the first reduction Most minimization methods are based on a generalization of the combining theorems X Y+ X Y = X and (X+Y) (X+Y ) = X Panupong Sornkhom, 2005/2 5

2. Karnaugh maps (K-maps) A graphical representation of a logic function s truth table The map for an n-input logic function is an array with 2 n cells, one for each possible input combination or minterm Each cell corresponds to an input combination that differs from each of its immediately adjacent neighbors in only one variable two-variable K-maps Pictures from textbook Introduction to logic design Panupong Sornkhom, 2005/2 6

three-variable K-maps four-variable K-maps Pictures from textbook Introduction to logic design Panupong Sornkhom, 2005/2 7

five-variable K-maps Pictures from textbook Introduction to logic design Panupong Sornkhom, 2005/2 8

six-variable K-maps Pictures from textbook Introduction to logic design Panupong Sornkhom, 2005/2 9

Representation of functions on K-maps Place a 1 corresponding to each minterm, all others are 0 Or, place a 0 corresponding to each maxterm, all others are 1 Usually, 0s are not shown explicitly on the K-maps, only 1s are shown, with a blank block corresponding to a 0. Pictures from textbook Introduction to logic design Panupong Sornkhom, 2005/2 10

Minimization 2 i 1-cells may be combined to form a product term containing n-i literals, where n is the number of variables in the function The remaining literals are the variables that have the same value throughout that set. The corresponding variable is complemented if it appears as 0 in all of the 1-cells, and uncomplemented if it appears as 1. Pictures from textbook Introduction to logic design Panupong Sornkhom, 2005/2 11

F = Σ X,Y,Z (0,1,4,5,6): (a) initial K-map; (b) K-map with circled product terms; (c) AND-OR circuit Pictures from textbook DDPP Panupong Sornkhom, 2005/2 12

Minimization (cont.) Definition A minimal sum of a logic function F(x 1,, x n ) is a sum-of-products expression for F such that no sum-of-products expression for F has fewer product terms, and any sum-of-products expression with the same number of product terms has at least as many literals A logic function P(x 1,, x n ) implies a logic function F(x 1,, x n ) if for every input combination such that P = 1, then F = 1 also. P => F, P implies F, F includes P, F covers P A prime implicant of a logic function F(x 1,, x n ) is a normal product term P(x 1,, x n ) that implies F, such that if any variable is removed from P, then the resulting product term does not imply F Panupong Sornkhom, 2005/2 13

Minimization (cont.) Definition (cont.) In term of K-map, a prime implicant of F is a circled set of 1- cells satisfying our combining rule, such that if we try to make it larger (covering twice as many cells), it cover one or more 0s. Prime-implicant theorem A minimal sum is a sum of prime implicants The sum of all the prime implicants of a logic function is called the complete sum. Although the complete sum is always a legitimate way to realize a logic function, it s not always minimal. So, how to select prime implicants to achieve a minimal sum? Panupong Sornkhom, 2005/2 14

F = Σ X,Y,Z (5,7,12,13,14,15): (a) K-map; (b) prime implicants Pictures from textbook DDPP Panupong Sornkhom, 2005/2 15

Minimization (cont.) Definition (cont.) A distinguished 1-cell of a logic function is an input combination that is covered only one prime implicant An essential prime implicant of a logic function is a prime implicant that covers one or more distinguished 1-cells Essential prime implicant must be included in every minimal sum for the logic function. So, the first step in the prime-implicant selection is identify distinguished 1-cells and the corresponding prime implicants and include the essential prime implicants in the minimal sum Then we need only determine how to cover 1-cells, if any, that are not covered by the essential prime implicant Panupong Sornkhom, 2005/2 16

F = Σ X,Y,Z (1,3,4,5,9,11,12,13,14,15): (a) K-map; (b) prime implicants and distinguished 1-cells Pictures from textbook DDPP Panupong Sornkhom, 2005/2 17

Minimization (cont.) Definition (cont.) Given two prime implicants P and Q in a reduced map, P is said to eclipse Q (written P Q) if P covers at least all the 1-cells covered by Q I P Q and P costs no more than Q, then removing Q from consideration cannot prevent us from finding a minimal sum; that is, P is at least as good as Q. In such case, P is a secondary essential prime implicant Panupong Sornkhom, 2005/2 18

F = ΣX,Y,Z(0,1,2,3,4,5,7, 14,15): (a) K-map; (b) prime implicants and distinguished 1-cells; (c) reduce map after removal of essential prime implicants and covered 1- cells Pictures from textbook DDPP Panupong Sornkhom, 2005/2 19

Minimization (cont.) Some logic function may not have essential prime implicants, we can find a minimal sum by trial and error method or use the branching method. Starting with any 1-cell, we arbitrarily select one of the prime implicants that cover it, and we include it if it were essential. This simplifies the remaining problem, which we can complete the usual way to find a tentative minimal sum. We repeat this process starting with all other prime implicants that cover the starting 1-cell, generating a different tentative minimal sum from each starting point. Finally, we examine all of the tentative minimal sums that we generated in this way and select one that is truly minimal Panupong Sornkhom, 2005/2 20

F = ΣX,Y,Z(1,5,7,9,11,15): (a) K-map; (b) prime implicants; (c) minimal sum; (d) another minimal sum Pictures from textbook DDPP Panupong Sornkhom, 2005/2 21

Don t-care input combinations Sometimes the specification of a combinational circuit is such that its output doesn t matter for certain input combinations, called don t-cares. The d( ) list specifies the don t-care input combinations for the function, also known as the d-set. The procedure for circling set of prime implicants in K-map with don t care is modified as follow: Allow d s to be included when circling sets of1s, to make the sets as large as possible. Do not circle any sets that contain only d s. Panupong Sornkhom, 2005/2 22

Prime BCD-digit detector: (a) initial K-map; (b) K-map with prime implicants and distinguished 1-cells Pictures from textbook DDPP Panupong Sornkhom, 2005/2 23

3. Quine-McCluskey procedure (QM procedure) K-maps are useful for function of up to five or six variables. Since the number of blocks doubles with addition of each variable, minimizing function with many variables becomes tedious The QM procedure is a tabular procedure that is useful in such cases The QM procedure uses the following step First, the minterms (and don t cares) of the function are classified into groups such that each term in a group contains the same number of 1s in the binary representation of the term Then the groups formed in step 1 are arranged in the increasing order of numbers of 1s. Let the number of groups be n. Each minterm in the group i (i = 1 to n-1) is compared those in group (i+1); if the two terms are adjacent, a combined term is formed. The variable thus eliminated is represent as - in the combined term. Panupong Sornkhom, 2005/2 24

3. QM procedure (cont.) The QM procedure (cont.) The matching operation of step 3 is repeated on the combined terms until no more combinations can be done. Each combined term in the final list is a prime implicant A prime implicant chart is then constructed, in which there is one column for each minterm (don t cares are not listed) and one row for each prime implicant. An X in a row-column intersection indicates that the prime implicant corresponding to the row covers the minterm corresponding to the column. Then all the essential prime implicants are located. A minimum number of prime implicants from the remaining ones are selected to cover those minterms not cover by the essential prime implicants. The set of prime implicants thus selected forms the minimum function Panupong Sornkhom, 2005/2 25

3. QM procedure (cont.) Example F = Σ A,B,C,D (0,2,4,5,6,9,10) + d(7,11,12,13,14,15) Step 1 and 2 0000 0010 0100 0101 Each minterm and don t-care is expanded into binary form, and groups of terms with the same number of 1s are formed. The group are then arranged in the order of increasing number of 1s. 6 9 10 12 7 11 0110 1001 1010 1100 0111 1011 Note that don t-cares are treated as 13 1101 equivalent to minterms until 14 1110 selection of PIs in step 5 15 1111 0 2 4 5 Group 0 Group 1 Group 2 Group 3 Group 4 Panupong Sornkhom, 2005/2 26

3. QM procedure (cont.) (0,2) 00-0 Groups (0,4) 0-00 0 and 1 Step 3 (2,6) 0-10 Groups The minterm in group 0 is compared with each minterm in group 1. Because 0 is adjacent to both 2 and 4, we obtain (0,2) and (0,4). The term that were combined are shown with a check mark. We now repeat comparison between term in groups 1 and 2. Minterm 2 combines with only 6 and 10, and minterm 4 combins only with 5, 6 and 12. This matching process is repeated between group 2 and 3 and group 3 and 4. (2,10) (4,5) (4,6) (4,12) (5,7) (5,13) (6,7) (6,14) (9,11) (1,13) (10,11) (10,14) (12,13) (12,14) (7,15) (11,15) (13,15) -010 010-01-0-100 01-1 -101 011- -110 10-1 1-01 101-1-10 110-11-0-111 1-11 11-1 1 and 2 Groups 2 and 3 Groups 3 and 4 (14,15) 111- Panupong Sornkhom, 2005/2 27

3. QM procedure (cont.) Step 4 Continue with the process of matching the terms obtained from previous step. Repeat the matching until no other combination are possible Hence, the remaining term in the list are prime implicants (0,2,4,6) (2,6,10,14) (4, 5, 6, 7) (4,5,12,13) (4,6,12,14) (5,7,13,15) (6,7,14,15) (9,11,13,15) (10,11,14,15) (12,13,14,15) (0,2,4,6) (2,6,10,14) (4, 5, 6, 7,12,13,14,15) (9,11,13,15) (10,11,14,15) 0--0 --10 01-- -10- -1-0 -1-1 -11-1--1 1-1- 11-- 0--0 --10-1-- 1--1 1-1- PI 1 PI 2 PI 3 PI 4 PI 5 Panupong Sornkhom, 2005/2 28

3. QM procedure (cont.) Step 5 Step 6 Draw PI chart which there will be one row corresponding to each PI and one column corresponding to each minterm. Don t-cares are ignored. An symbol in the row-column intersection indicates that the minterm corresponding to the column is covered by the PI corresponding to the row. PI 1 PI 2 PI 3 PI 4 If there is a single in any column, the corresponding PI is essential PI 5 0 2 4 minterm 5 6 9 10 Panupong Sornkhom, 2005/2 29

3. QM procedure (cont.) Step 7 Step 8 Once PI 1, PI 3, and PI 4 are selected, all the minterms except 10 are covered To cover minterm 10, we can select either PI 2 or PI 5, since they have the same number of literals Reduce function is F(A,B,C,D) = PI 1 + PI 3 + PI 4 + PI 2 or PI 5 = 0--0 + -1-- + 1--1 + --10 or 1-1- = A D +B+AD+ A B or A D +B+AD+ A C PI 1 PI 2 PI 3 PI 4 PI 5 0 2 minterm 4 5 6 9 10 Panupong Sornkhom, 2005/2 30