DIGITAL ELECTRONICS & it0203 Semester 3

Similar documents
Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

UNIT 5 KARNAUGH MAPS Spring 2011

CHAPTER III BOOLEAN ALGEBRA

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

CHAPTER III BOOLEAN ALGEBRA

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 2 Circuit Optimization

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

Chapter 2 Boolean Algebra and Logic Gates

Week-I. Combinational Logic & Circuits

Digital Logic Design. Combinational Logic

Chapter 2 Combinational Logic Circuits

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

ELC224C. Karnaugh Maps

ENG2410 Digital Design Combinational Logic Circuits

Karnaugh Maps Objectives

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

CHAPTER 5 KARNAUGH MAPS

Chap 2. Combinational Logic Circuits

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

Quine-McCluskey (Tabular) Minimization

Advanced Digital Design with the Verilog HDL, Second Edition Michael D. Ciletti Prentice Hall, Pearson Education, 2011

Unit 2 Session - 6 Combinational Logic Circuits

Number System conversions

This form sometimes used in logic circuit, example:

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

Boolean Algebra and Logic Design (Class 2.2 1/24/2013) CSE 2441 Introduction to Digital Logic Spring 2013 Instructor Bill Carroll, Professor of CSE

Optimizations and Tradeoffs. Combinational Logic Optimization

MC9211 Computer Organization

CHAPTER 3 BOOLEAN ALGEBRA

Digital Circuit And Logic Design I. Lecture 4

ELCT201: DIGITAL LOGIC DESIGN

Combinational Logic Circuits Part II -Theoretical Foundations

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

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

Midterm1 Review. Jan 24 Armita

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

UNIT 3 BOOLEAN ALGEBRA (CONT D)

Gate-Level Minimization

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

Contents. Chapter 3 Combinational Circuits Page 1 of 36

Chapter 3. Boolean Algebra. (continued)

Chapter 2 Combinational Logic Circuits

Lecture 7: Karnaugh Map, Don t Cares

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

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

Simplifying Logic Circuits with Karnaugh Maps

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

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

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Karnaugh Map & Boolean Expression Simplification

211: Computer Architecture Summer 2016

Chapter 4 Optimized Implementation of Logic Functions

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

APPLİCATION OF BOOLEAN ALGEABRA

Standard Expression Forms

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Combinational Logic Design Principles

Chapter 2 Combinational logic

Minimization techniques

Unit 6. Quine-McClusky Method. Unit 6 1

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

Combinational Logic Fundamentals

Combinatorial Logic Design Principles

Chapter 2 Combinational Logic Circuits

CHAPTER 2 BOOLEAN ALGEBRA

Digital Logic Circuits - Switching Algebra - Combinational Circuits -

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

Logic Design. Chapter 2: Introduction to Logic Circuits

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

Signals and Systems Digital Logic System

If f = ABC + ABC + A B C then f = AB C + A BC + AB C + A BC + A B C

EC-121 Digital Logic Design

Logic Design I (17.341) Fall Lecture Outline

Chapter 2 Combinational

1. Expand each of the following functions into a canonical sum-of-products expression.

Unit 2 Boolean Algebra

CPE100: Digital Logic Design I

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

Chapter-2 BOOLEAN ALGEBRA

CPE100: Digital Logic Design I

Chapter 2 : Boolean Algebra and Logic Gates

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Binary logic consists of binary variables and logical operations. The variables are

Combinational Logic. Review of Combinational Logic 1

CHAPTER 7. Exercises 17/ / /2 2 0

CS/EE 181a 2010/11 Lecture 4

Review for Test 1 : Ch1 5

L2: Combinational Logic Design (Construction and Boolean Algebra)

Karnaugh Maps ف ر آ ا د : ا ا ب ا م آ ه ا ن ر ا

Chapter 2. Boolean Algebra and Logic Gates

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

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

Combinational Logic Design/Circuits

Solutions to Assignment No 5 Digital Techniques Fall 2007

Chapter 7 Logic Circuits

CSE 140: Components and Design Techniques for Digital Systems

MODULAR CIRCUITS CHAPTER 7

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

K-map Definitions. abc

Transcription:

DIGITAL ELECTRONICS & it0203 Semester 3 P.Rajasekar & C.M.T.Karthigeyan Asst.Professor SRM University, Kattankulathur School of Computing, Department of IT 8/22/2011 1

Disclaimer The contents of the slides are solely for the purpose of teaching students at SRM University. All copyrights and Trademarks of organizations/persons apply even if not specified explicitly. School of Computing, Department of IT 8/22/2011 2

3 UNIT 2 SIMPLIFICATION OF BOOLEAN ALGEBRA

The Consensus Theorem 4 Z Y YZ Z Y ' ' + = + + Z Y Y Z Z Y YZ Z YZ Y YZ Z Y YZ Z Y ' ) (1 ' ) (1 ) ' ' ( ) ( ') ( ' ' + = + + + = + + + = + + + = + + ' ' ' ' ' ' ' bc ac a b ab b c bc ac b a + + = + + + + ) ' )( ( ) )( ' )( ( Z Y Z Y Z Y + + = + + + ') ')( ( ') ')( ')( ( d c b c b a d c b d b a c b a + + + + = + + + + + + Consensus Theorem Proof Example: consensus consensus Dual form of consensus theorem Example:

The Consensus Theorem Example: eliminate BCD A ' C' D + A' BD + BCD + ABC + ACD' Example: eliminate A BD, ABC A ' C' D + A' BD + BCD + ABC + ACD' Example: Reducing an expression by adding a term and eliminate. F = ABCD + B' CDE + A' B' + BCE' F = ABCD + B' CDE + A' B' + BCE' + ACDE Final expression F = A' B' + BCE' + ACDE Consensus Term added 5

Algebraic Simplification of Switching Expressions 1. Combining terms Example: Y + Y ' = abc ' d' + abcd' = abd' [ = abd', Y = c] Adding terms using + = ab ' c + abc + a' bc = ab' c + abc + abc + a' bc = ac + bc Example: ( a + bc)( d [ = d + e', Y + e') + a'( b' + c')( d = a + bc, Y ' = + e') = d a'( b' + c')] + e' 2. Eliminating terms + Y = a ' b + a' bc = a' b [ = a' b] ' bc' + bcd + a' bd = a' bc' bcd [ = c, Y = bd, Z = a' b] Example: a + 6

Algebraic Simplification of Switching Expressions 3. Eliminating literals + ' Y = + Y Example: adding xy to x, etc ) Example: W Y A' B + A' B' C' D' + ABCD' = A'( B + B' C' D') + ABCD' = A'( B + C' D') + ABCD' = B( A' + ACD') + A' C' D' = B( A' + CD') + A' C' D' = A' B + BCD' + A' C' D' 4. Adding redundant terms (Adding xx, multiplying (x+x ), adding yz to xy+x z, + (add WZ by consensus theorem) + ' Z' + WY ' Z' = W + Y + ' Z' + WY ' Z' + WZ' = W + Y + ' Z' + WZ' = W + Y + ' Z' (eliminate WY Z ) (eliminate WZ ) (3 27) 7

Proving Validity of an Equation Proving an equation valid 1. Construct a truth table and evaluate both sides tedious, not elegant method 2. Manipulate one side by applying theorems until it is the same as the other side 3. Reduce both sides of the equation independently 4. Apply same operation in both sides ( complement both sides, add 1 or 0 ) 8

Proving Validity of an Equation Prove : A' BD' + BCD + ABC' + AB' D = BC' D' + AD + A' BC = A ' BD' + BCD + ABC' + AB' D + BC' D' + A' BC + ABD (add consensus of A BD and ABC ) (add consensus of A BD and BCD) (add consensus of BCD and ABC ) = AD + A' BD' + BCD + ABC' + BC' D' + A' BC = BC' D' + AD + A' BC (eliminate consensus of BC D and AD) (eliminate consensus of AD and A BC) (eliminate consensus of BC D and A BC) 9

Proving Validity of an Equation Some of Boolean Algebra are not true for ordinary algebra Example: If x + y = x + z, then y = z True in ordinary algebra 1+ 0 = 1+ 1but 0 1 Not True in Boolean algebra Example: If xy = xz, then y = z True in ordinary algebra Not True in Boolean algebra Example: If y = z, then x + y = x + z True in ordinary algebra If y = z, then xy = xz True in Boolean algebra 10

COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus logic propagation delays I 1 Combinational O 1 I m Logic O n 11

COMBINATIONAL LOGIC Combinational logic has no memory. Outputs are only function of current input combination Nothing is known about past events Repeating a sequence of inputs always gives the same output sequence Sequential logic (covered later) does have memory Repeating a sequence of inputs can result in an entirely different output sequence 12

COMBINATIONAL LOGIC Three main steps in designing a singleoutputcombinational switching network: 1. Find a switching function which specifies the desired behavior of the network. 2. Simplify the algebraic expression for the function. 3. Realize the function using available logic elements (gates). 13

COMBINATIONAL LOGIC EAMPLE Sentence Representation Z= The alarm will ring iff A= the alarm switch is on and B = the door is not closed or C= it is after 6 pm and D = the window is not closed. Equation Representation Z = AB + CD Schematic Representation B D A C Z 14

DESIGN USING TRUTH TABLE Example: ABC represents a 3 bit binary number e.g. 011 = 3, 101 = 5 Output F is 1 if ABC >= 011 and is 0 if ABC < 011 A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 The 1 s represent F(A,B,C). The 0 s represent F (A,B,C) 15

EAMPLE Cont d: TRUTH TABLE TO SOP FORM Can write SOP form of equation directly from truth table. A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 F(A,B,C) = A BC + AB C + AB C + ABC + ABC = A BC + AB + AB = A BC + A = A + BC A BC AB C AB C ABC ABC B C A F Note that each term in F has ALL variables present. If a product term has ALL variables present, it is a MINTERM. 16

TRUTH TABLE TO POS FORM To get POS form of F, write SOP form of F, then use DeMorgan s Law. A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 A B C A B C A BC F (A,B,C) = A B C + A B C + A BC Take complement of both sides: (F (A,B,C)) = (A B C + A B C + A BC ) Apply DeMorgan s Law to right side. Left side is (F ) = F. F(A,B,C) = (A B C ) (A B C) (A BC ) Apply DeMorgan s Law to each term F(A,B,C) = (A+B+C)(A+B+C )(A+B +C) which is in POS Form. 17

MINTERMS, MATERMS We saw that: F(A,B,C) = A BC + AB C + AB C + ABC + ABC + ABC SOP form. If a product term has all variables present (each occurring exactly once, in complemented or uncomplemented form, but not both), it is a MINTERM. F(A,B,C) = (A+B+C) (A+B+C )(A+B +C) POS form. If a sum term has all variables present (each occurring exactly once, in complemented or uncomplemented form, but not both), it is a MATERM. All Boolean functions can be written in terms of either Minterms or Maxterms. 18

MINTERM, MATERM NOTATION Each line in a truth table represents both a Minterm and a Maxterm. Row No. A B C Minterms Maxterms 0 0 0 0 A B C = m 0 A+B+C = M 0 1 0 0 1 A B C = m 1 A+B+C = M 1 2 0 1 0 A B C = m 2 A+B +C = M 2 3 0 1 1 A B C = m 3 A+B +C = M 3 4 1 0 0 A B C = m 4 A +B+C = M 4 5 1 0 1 A B C = m 5 A +B+C = M 5 6 1 1 0 A B C = m 6 7 1 1 1 A B C = m 7 A +B +C = M 6 A +B +C = M 7 19

USING MINTERMS, MATERMS A boolean function can be written in terms of Minterm or Maxterm notation as a shorthand method of specifying the function. F(A,B,C) = A BC + AB C + AB C + ABC + ABC + ABC = m 3 + m 4 + m 5 + m 6 + m 7 = Σ m(3,4,5,6,7) F(A,B,C) = (A+B+C) (A+B+C )(A+B +C) = M 0 M 1 M 2 = M(0,1,2) Minterms correspond to 1 s of F, Maxterms correspond to 0 s of F in truth table. 20

FROM MINTERMS TO TRUTH TABLE Minterms correspond to 1 s in Truth table F(A,B,C) = Σ m(1,2,6) = m 1 + m 2 + m 6 = A B C + A BC + ABC m 1 m 2 m 6 A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0 21

FROM MINTERMS TO MATERMS TO TRUTH TABLE To go from Minterms to Maxterms, list the numbers that belong to F (with 3 variables, minterm/maxterm numbers range from 0 to 7) F(A,B,C) = Σ m(1,2,6) = M(0,3,4,5,7) = (A+B+C)(A+B +C )(A +B+C) (A +B+C )(A +B +C ) M 0 M 3 M 4 M 5 M 7 Maxterms correspond to 0 s in Truth table A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0 22

CONVERSION OF FORMS SUMMARY Sum of Minterms to Product of Maxterms Rewrite minterm shorthand using maxterm shorthand. Replace minterm indices with indices not already used. e.g: F(A,B,C) = m(3,4,5,6,7) = M(0,1,2) Product of Maxterms to Sum of Minterms Rewrite maxterm shorthand using minterm shorthand. Replace maxterm indices with indices not already used. e.g: F(A,B,C) = M(0,3,5,6) = m(1,2,4,7) 23

CONVERSION OF FORMS FUNCTION AND DUAL Sum of Minterms of F to Sum of Minterms of F In minterm shorthand form, list the indices not already used in F. e.g: F(A,B,C) = m(3,4,5,6,7) F (A,B,C) = m(0,1,2) Product of Maxterms of F to Prod of Maxterms of F In maxterm shorthand form, list the indices not already used in F. e.g: F(A,B,C) = M(0,1,2) F (A,B,C) = M(3,4,5,6,7) 24

CONVERSION OF FORMS FUNCTION AND DUAL Sum of Minterms of F to Product of Maxterms of F Rewrite in maxterm shorthand form, using the same indices as in F. e.g: F(A,B,C) = m(3,4,5,6,7) F (A,B,C) = M(3,4,5,6,7) Product of Maxterms of F to Sum of Minterms of F Rewrite in minterm shorthand form, using the same indices as in F. e.g: F(A,B,C) = M(0,1,2) F (A,B,C) = m(0,1,2) 25

EAMPLES F(A,B,C,D) = Σ m(0) (minterm form) = A B C D (SOP form) = M(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) (maxterm form) (POS form too long to write..) F(A,B) = Σ m(1,2) (minterm form) = A B + AB (SOP form) = M(0,3) (maxterm form) = (A+B)(A +B ) (POS form) 26

MINTERM EPANSION A minterm must have every variable present. If a boolean product term does not have every variable present, then it can be expanded to its minterm representation. F(A,B,C) = AB + C neither AB, or C are minterms To expand AB to minterms, use the relation: AB = AB(C+ C ) = ABC + ABC To expand C to minterms, do: C = C(A+A ) = AC+ A C = AC(B+B ) + A C(B+B ) = ABC + AB C + A BC + A B C F = AB +C = A B C + A BC + AB C + ABC + ABC F(A,B,C) = Σ m(1,3,5,6,7) 27

MATERM EPANSION A maxterm must have every variable present. If a boolean sum term does not have every variable present, then it can be expanded to its maxterm representation. F(A,B,C) = (A+B) (C) neither (A+B), or C are maxterms To expand (A+B) to maxterms, use the relation: (A+B) = (A+B+C C) = (A+B+C )(A+B+C) To expand C to maxterms, do: C = C+A A = (A +C)(A+C) = (A +C +BB )(A+C+BB ) = (A +B +C)(A +B+C)(A+B +C)(A+B+C) F = (A+B)(C) = (A+B+C)(A+B+C )(A+B +C)(A +B+C)(A +B +C) F(A,B,C) = Π M(0,1,2,4,6) 28

Karnaugh Maps (K map) A K map is a collection of squares Each square represents a minterm The collection of squares is a graphical representation of a Boolean function Adjacent squares differ in the value of one variable Alternative algebraic expressions for the same function are derived by recognizing patterns of squares The K map can be viewed as A reorganized version of the truth table A topologically warped Venn diagram as used to visualize sets in algebra of sets 29

Some Uses of K Maps Provide a means for: Finding optimum or near optimum SOP and POS standard forms, and two level AND/OR and OR/AND circuit implementations for functions with small numbers of variables Visualizing concepts related to manipulating Boolean expressions, and Demonstrating concepts used by computeraided design programs to simplify large circuits 30

Two Variable Maps A 2 variable Karnaugh Map: Note that minterm m0 and minterm m1 are adjacent and differ in the value of the variable y Similarly, minterm m0 and y = 0 y = 1 x = 0 m 0 = m 1 = minterm m2 differ in the x variable. Also, m1 and m3 differ in the x variable as well. Finally, m2 and m3 differ in the value of the variable y x x = 1 m 2 = m 3 = x y y x x y y 31

K Map and Truth Tables The K Map is just a different form of the truth table. Example Two variable function: We choose a,b,c and d from the set {0,1} to implement a particular function, F(x,y). Function Table Input Values (x,y) Function Value F(x,y) 0 0 a 0 1 b 1 0 c 1 1 d K Map y = 0 y = 1 x = 0 a b x = 1 c d 32

K Map Function Representation Example: F(x,y) = x F = x y = 0 y = 1 x = 0 0 0 x = 1 1 1 For function F(x,y), the two adjacent cells containing 1 s can be combined using the Minimization Theorem: F ( x, y ) = x y + x y = x 33

K Map Function Representation Example: G(x,y) = x + y G = x+y y = 0 y = 1 x = 0 0 1 x = 1 1 1 For G(x,y), two pairs of adjacent cells containing 1 s can be combined using the Minimization Theorem: ( ) ( ) x y + x y + xy + x y = x y G ( x, y ) = + Duplicate xy 34

Three Variable Maps A three variable K map: yz=00 yz=01 yz=11 yz=10 x=0 m 0 m 1 m 3 m 2 x=1 m 4 m 5 m 7 m 6 Where each minterm corresponds to the product terms: x=0 x=1 yz=00 yz=01 yz=11 yz=10 x x y y z z Note that if the binary value for an index differs in one bit position, the minterms are adjacent on the K Map x x y y z z x x y y z z x x y y z z 35

Alternative Map Labeling Map use largely involves: Entering values into the map, and Reading off product terms from the map. Alternate labelings are useful: x x z y 0 1 3 2 4 z y 5 7 6 z x y z x 0 1 z y 0 1 3 2 4 00 01 11 10 5 7 6 36

Example Functions By convention, we represent the minterms of F by a "1" in the map and leave the minterms of blank F Example: Example: F(x, y, z) = Σ G(a, b,c) = Σ Learn the locations of the 8 indices based on the variable order shown (x, most significant and z, least significant) on the map boundaries m m (2,3,4,5) (3,4,6,7) x y 0 1 31 21 41 x 5 1 7 6 z y 0 1 31 2 41 5 71 61 z 37

Combining Squares By combining squares, we reduce number of literals in a product term, reducing the literal cost, thereby reducing the other two cost criteria On a 3 variable K Map: One square represents a minterm with three variables Two adjacent squares represent a product term with two variables Four adjacent terms represent a product term with one variable Eight adjacent terms is the function of all ones (no variables) = 1. 38

Example: Combining Squares Example: Let F = Σm(2,3,6,7) x Applying the Minimization Theorem three times: y 0 1 31 21 4 5 71 61 z F (x, y, z) = x y z + x y z + x y z + = yz + yz = y Thus the four terms that form a 2 2 square correspond to the term "y". x y z 39

Three Variable Maps Reduced literal product terms for SOP standard forms correspond to rectangles on K maps containing cell counts that are powers of 2. Rectangles of 2 cells represent 2 adjacent minterms; of 4 cells represent 4 minterms that form a pairwise adjacent ring. Rectangles can contain non adjacent cells as illustrated by the pairwise adjacent ring above. 40

Three Variable Maps Topological warps of 3 variable K maps that show all adjacencies: Venn Diagram Cylinder 0 Y 4 6 7 5 3 2 1 Z 41

Three Variable Maps Example Shapes of 2 cell Rectangles: y 0 1 3 2 x 4 5 7 6 z Read off the product terms for the rectangles shown 42

Three Variable Maps Example Shapes of 4 cell Rectangles: y 0 1 3 2 x 4 5 7 6 z Read off the product terms for the rectangles shown 43

Three Variable Maps K Maps can be used to simplify Boolean functions by systematic methods. Terms are selected to cover the 1s in the map. Example: Simplify F(x, y, z) = Σm(1,2,3,5,7) z y x y x 1 1 1 1 z 1 F(x, y, z) = z + x y 44

Three Variable Map Simplification Use a K map to find an optimum SOP equation for F(, Y, Z) = Σ m (0,1,2,4,6,7) 45

Four Variable Maps Map and location of minterms: Y 0 1 3 2 5 6 4 7 Variable Order W 12 13 15 14 8 9 11 10 Z 46

Four Variable Terms Four variable maps can have rectangles corresponding to: Asingle 1 = 4 variables, (i.e. Minterm) Two 1s = 3 variables, Four 1s = 2 variables Eight 1s = 1 variable, Sixteen 1s = zero variables (i.e. Constant "1") 47

Four Variable Maps Example Shapes of Rectangles: 0 1 3 2 Y 5 6 4 7 12 13 15 14 W 8 9 11 10 Z 48

Four Variable Maps Example Shapes of Rectangles: Y 0 1 3 2 5 6 4 7 12 13 15 14 W 8 9 11 10 Z 49

Four Variable Map Simplification F(W,, Y, Z) = Σ m (0, 2,4,5,6,7,8,10,13,15) 50

Four Variable Map Simplification F(W,, Y, Z) = Σ m (3,4,5,7,9,13,14,15) 51

Systematic Simplification A Prime Implicant is a product term obtained by combining the maximum possible number of adjacent squares in the map into a rectangle with the number of squares a power of 2. A prime implicant is called an Essential Prime Implicant if it is the only prime implicant that covers (includes) one or more minterms. Prime Implicants and Essential Prime Implicants can be determined by inspection of a K Map. A set of prime implicants "covers all minterms" if, for each minterm of the function, at least one prime implicant in the set of prime implicants includes the minterm. 52

Example of Prime Implicants Find ALL Prime Implicants B D CD C 1 1 1 ESSENTIAL Prime Implicants C B D 1 1 1 BD A A B 1 1 1 1 1 1 1 1 B BD A 1 1 1 1 1 1 1 1 B AD D B C Minterms covered by single prime implicant D 53

Prime Implicant Practice Find all prime implicants for: F(A, B,C, D) = Σ m (0,2,3,8,9,10,11,12,13,14,15) 54

Another Example Find all prime implicants for: G(A, B,C, D) = Σ m (0,2,3,4,7,12,13,14,15) Hint: There are seven prime implicants! 55

Five Variable or More K Maps For five variable problems, we use two adjacent K maps. It becomes harder to visualize adjacent minterms for selecting PIs. You can extend the problem to six variables by using four K Maps. V = 0 Y V = 1 Y W W Z Z 56

Don't Cares in K Maps Sometimes a function table or map contains entries for which it is known: the input values for the minterm will never occur, or The output value for the minterm is not used In these cases, the output value need not be defined Instead, the output value is defined as a don't care By placing don't cares ( an x entry) in the function table or map, the cost of the logic circuit may be lowered. Example 1: A logic function having the binary codes for the BCD digits as its inputs. Only the codes for 0 through 9 are used. The six codes, 1010 through 1111 never occur, so the output values for these codes are x to represent don t cares. 57

Don't Cares in K Maps Example 2: A circuit that represents a very common situation that occurs in computer design has two distinct sets of input variables: A, B, and C which take on all possible combinations, and Y which takes on values 0 or 1. and a single output Z. The circuit that receives the output Z observes it only for (A,B,C) = (1,1,1) and otherwise ignores it. Thus, Z is specified only for the combinations (A,B,C,Y) = 1110 and 1111. For these two combinations, Z = Y. For all of the 14 remaining input combinations, Z is a don t care. Ultimately, each x entry may take on either a 0 or 1 value in resulting solutions For example, an x may take on value 0 in an SOP solution and value 1 in a POS solution, or vice versa. Any minterm with value x need not be covered by a prime implicant. 58

Example: BCD 5 or More w 1 The map below gives a function F1(w,x,y,z) which is defined as "5 or more" over BCD inputs. With the don't cares used for the 6 non BCD combinations: 0 0 0 0 0 0 1 3 2 1 4 5 7 6 12 13 15 14 1 8 9 11 10 z 1 y 1 x F1 (w,x,y,z) = w + x z + x y G = 7 This is much lower in cost than F2 where the don't cares were treated as "0s." G = 12 For x, this y, z) particular = w x z function, + w x y cost w xg yfor the POS solution for F 1 (w,x,y,z) is not changed by using the don't cares. F 2 (w, + 59

Product of Sums Example Find the optimum POS solution: F(A, B,C, D) = Σm (3,9,11,12,13,14,15) + Σd (1,4,6) F Hint: Use and complement it to get the result. 60

Optimization Algorithm Find all prime implicants. Include all essential prime implicants in the solution Select a minimum cost set of non essential prime implicants to cover all minterms not yet covered: Obtaining an optimum solution: See Reading Supplement More on Optimization Obtaining a good simplified solution: Use the Selection Rule 61

Prime Implicant Selection Rule Minimize the overlap among prime implicants as much as possible. In particular, in the final solution, make sure that each prime implicant selected includes at least one minterm not included in any other prime implicant selected. 62

Selection Rule Example Simplify F(A, B, C, D) given on the K map. C Selected Essential C 1 1 1 1 1 A 1 1 1 1 1 1 1 B A 1 1 1 1 1 1 1 B D Minterms covered by essential prime implicants D 63

Selection Rule Example with Don't Cares Simplify F(A, B, C, D) given on the K map. C Selected Essential C 1 x 1 x A 1 x x 1 x 1 1 x B x A 1 x 1 x 1 1 x B D Minterms covered by essential prime implicants D 64

Quine McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal cover (cover tables) All work is done in tabular form Number of variables is not a limitation Basis for many computer implementations Proper organization and term identification are key factors for correct results 65

Quine McCluskey Minimization (cont.) Terms are initially listed one per line in groups Each group contains terms with the same number of true and complemented variables Terms are listed in numerical order within group Terms and implicants are identified using one of three common notations full variable form cellular form 1,0, form 66

Notation Forms Full variable form variables and complements in algebraic form hard to identify when adjacency applies very easy to make mistakes Cellular form terms are identified by their decimal index value Easy to tell when adjacency applies; indexes must differ by power of two (one bit) Implicants identified by term nos. separated by comma; differing bit pos. in () following terms 67

Notation Forms (cont.) 1,0, form terms are identified by their binary index value Easier to translate to/from full variable form Easy to identify when adjacency applies, one bit is different shows variable(s) dropped when adjacency is used Different forms may be mixed during the minimization 68

Example of Different Notations F(A, B, C, D) = Σ m(4,5,6,8,10,13) Full variable Cellular 1,0, 1 ABCD 4 0100 ABCD 8 1000 2 ABCD 5 0101 ABCD 6 0110 ABCD 10 1010 3 ABCD 13 1101 69

Implication Table Quine McCluskey Method Tabular method to systematically find all prime implicants ƒ(a,b,c,d) = Σ m(4,5,6,8,9, 10,13) + Σ d(0,7,15) Part 1: Find all prime implicants Step 1: Fill Column 1 with active set and DC set minterm indices. Group by number of true variables. Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 Implication Table 1111 NOTE: DCs are included in this step! 70

Minimization First Pass Quine McCluskey Method Tabular method to systematically find all prime implicants ƒ(a,b,c,d) = Σ m(4,5,6,8,9,10,13) + Σ d(0,7,15) Part 1: Find all prime implicants Step 2: Apply Adjacency Compare elements of group with N 1's against those with N+1 1's. One bit difference implies adjacent. Eliminate variable and place in next column. E.g., 0000 vs. 0100 yields 0 00 0000 vs. 1000 yields 000 When used in a combination, mark with a check. If cannot be combined, mark with a star. These are the prime implicants. Repeat until nothing left. Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 Implication Table Column II 0-00 -000 010-01-0 100-10-0 01-1 -101 011-1-01-111 11-1 71

Minimization Second Pass Quine McCluskey Method Step 2 cont.: Apply Adjacency Compare elements of group with N 1's against those with N+1 1's. One bit difference implies adjacent. Eliminate variable and place in next column. E.g., 0000 vs. 0100 yields 0 00 0000 vs. 1000 yields 000 When used in a combination, mark with a check. If cannot be combined, mark with a star. These are the prime implicants. Repeat until nothing left. Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 Implication Table Column II 0-00 * -000 * 010-01-0 100- * 10-0 * 01-1 -101 011-1-01 * Column III 01-- * -1-1 * 1111-111 11-1 72

Prime Implicants AB CD 00 01 11 A 10 C 00 01 11 10 1 0 1 0 1 1 1 0 0 0 1 0 1 B D Prime Implicants: 0-00 = 100 - = A C D A B C - 000 = 10-0 = B C D A B D 1-01= A C D - 1-1= B D 01 - - = A B 73

Prime Implicants (cont.) Prime Implicants: AB CD 00 01 11 C 10 A 00 01 11 10 1 0 1 0 1 1 1 0 0 0 1 0 1 B D 0-00 = 100 - = A C D A B C - 000 = 10-0 = B C D A B D 1-01= A C D - 1-1= B D 01 - - = A B Stage 2: find smallest set of prime implicants that cover the active-set recall that essential prime implicants must be in final expression 74

Coverage Table Coverage Chart 0,4(0-00) 4 5 6 8 9 10 13 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) rows = prime implicants columns = ON-set elements place an "" if ON-set element is covered by the prime implicant Note: Don t include DCs in coverage table; they don t have covered by the final logic expression! 75

Coverage Table (cont.) Coverage Chart 0,4(0-00) 4 5 6 8 9 10 13 0,4(0-00) 4 5 6 8 9 10 13 0,8(-000) 0,8(-000) 8,9(100-) 8,9(100-) 8,10(10-0) 8,10(10-0) 9,13(1-01) 9,13(1-01) 4,5,6,7(01--) 4,5,6,7(01--) 5,7,13,15(-1-1) 5,7,13,15(-1-1) rows = prime implicants columns = ON-set elements place an "" if ON-set element is covered by the prime implicant If column has a single, than the implicant associated with the row is essential. It must appear in minimum cover 76

Coverage Table (cont.) 0,4(0-00) 4 5 6 8 9 10 13 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) Eliminate all columns covered by essential primes 77

Coverage Table (cont.) 0,4(0-00) 4 5 6 8 9 10 13 0,4(0-00) 4 5 6 8 9 10 13 0,8(\000) 0,8(\000) 8,9(100-) 8,9(100-) 8,10(10-0) 8,10(10-0) 9,13(1-01) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4,5,6,7(01--) 5,7,13,15(-1-1) Eliminate all columns covered by essential primes Find minimum set of rows that cover the remaining columns F = ABD + ACD + AB 78

bibliography Charles H. Roth Jr., Fundamentals of logic design, Thomson Asia,5th edition 2004 (CH1,CH2,CH3,CH4,CH5,CH6,CH7,CH9,CH1 1,CH12) M. Morris Mano, Digital Logic and Computer Design, Prentice Hall of India Floyd, Digital Fundamentals, Universal Book Stall, 3rd Edition,1986 Morris Mano, Digital Design, Prentice Hall of India, 2nd Edition 1991 Bigell & Donovan, Digital Electronics, Thomson Asia Pvt. Ltd., 4th Edition School of Computing, Department of IT 8/22/2011 79

Review questions 1. State consensus theorem. 2. Define minterm 3. What are the merits and demerits of map method? 4. What is the use of including don t care term in K map? 5. In what way Quine Mc cluskey method is advantages over K map? 6. Minimize in SOP form using k map? F (A, B, C)=A B C +A BC +A BC School of Computing, Department of IT 8/22/2011 80

Review questions 7. Express the following function in canonical form f=a C+B C +AB 8. Represent the following sentences by a Boolean equation: The product of A & B is negative iff A is negative and B is positive or A is positive and B is negative. School of Computing, Department of IT 8/22/2011 81