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

Similar documents
Chapter 2 Combinational Logic Circuits

This form sometimes used in logic circuit, example:

Chapter 2 Combinational Logic Circuits

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

Simplifying Logic Circuits with Karnaugh Maps

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

ENG2410 Digital Design Combinational Logic Circuits

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

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

Gate-Level Minimization

14:332:231 DIGITAL LOGIC DESIGN

Digital Logic Design. Combinational Logic

DIGITAL ELECTRONICS & it0203 Semester 3

UNIT 5 KARNAUGH MAPS Spring 2011

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

Chapter 4 Optimized Implementation of Logic Functions

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Unit 2 Session - 6 Combinational Logic Circuits

Karnaugh Maps Objectives

Combinational Logic Circuits Part II -Theoretical Foundations

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Optimizations and Tradeoffs. Combinational Logic Optimization

Boolean Algebra and Logic Simplification

211: Computer Architecture Summer 2016

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

WEEK 3.1 MORE ON KARNAUGH MAPS

Midterm1 Review. Jan 24 Armita

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

CHAPTER III BOOLEAN ALGEBRA

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

MC9211 Computer Organization

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

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

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

CSE 140 Midterm I - Solution

Minimization techniques

CHAPTER III BOOLEAN ALGEBRA

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

1 Boolean Algebra Simplification

Lecture 7: Karnaugh Map, Don t Cares

Karnaugh Map & Boolean Expression Simplification

ELC224C. Karnaugh Maps

EEE130 Digital Electronics I Lecture #4

Lecture 4: More Boolean Algebra

Chapter 7 Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

Karnaugh Maps (K-Maps)

EXPERIMENT #4: SIMPLIFICATION OF BOOLEAN FUNCTIONS

Introduction to Karnaugh Maps

Digital Circuit And Logic Design I. Lecture 4

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

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

Logic Design I (17.341) Fall Lecture Outline

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

Number System conversions

Combinatorial Logic Design Principles

Contents. Chapter 3 Combinational Circuits Page 1 of 36

Lecture 5. Karnaugh-Map

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

Standard Expression Forms

WEEK 2.1 BOOLEAN ALGEBRA

Spiral 1 / Unit 5. Karnaugh Maps

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

CPE100: Digital Logic Design I

Review for Test 1 : Ch1 5

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

K-map Definitions. abc

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

CHAPTER 2 BOOLEAN ALGEBRA

Chap 2. Combinational Logic Circuits

Combinational Logic Fundamentals

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

T02 Tutorial Slides for Week 6

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

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

Chapter 2 Combinational logic

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

CMSC 313 Preview Slides

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

CSE 140: Components and Design Techniques for Digital Systems

CS 226: Digital Logic Design

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

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

Logical Design of Digital Systems

Lecture 4: Four Input K-Maps

Read this before starting!

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

ENGR 303 Introduction to Logic Design Lecture 3. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

CHAPTER 7. Exercises 17/ / /2 2 0

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

Possible logic functions of two variables

Logic Design. Chapter 2: Introduction to Logic Circuits

Week-I. Combinational Logic & Circuits

CHAPTER 5 KARNAUGH MAPS

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 2-<101>

CS61c: Representations of Combinational Logic Circuits

Section 001. Read this before starting!

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

Transcription:

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

Presentation Outline Boolean Function Minimization The Karnaugh Map (K-Map) Two, Three, and Four-Variable K-Maps Prime and Essential Prime Implicants Minimal Sum-of-Products and Product-of-Sums Don't Cares Five and Six-Variable K-Maps Multiple Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 2

Boolean Function Minimization Complexity of a Boolean function is directly related to the complexity of the algebraic expression The truth table of a function is unique However, the algebraic expression is not unique Boolean function can be simplified by algebraic manipulation However, algebraic manipulation depends on experience Algebraic manipulation does not guarantee that the simplified Boolean expression is minimal The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 3

Example: Sum of Minterms Truth Table x y z f Minterm 0 0 0 0 0 0 = 0 0 2 = 0 3 = 0 0 0 0 5 = 0 0 7 = Focus on the entries = + + + + =,2,3,5,7 = + + + + Sum-of-Minterms has 5 literals Can be simplified The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 4

Algebraic Manipulation Simplify:= + + + + (5 literals) = + + + + = + + + + (Sum-of-Minterms) Reorder = + + +( +) Distributive over + = + + = ++ Simplify (7 literals) Reorder =( +)+ Distributive over + =+ Simplify (4 literals) =(+ )(+ ) Distributive + over =+ Simplify (3 literals) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 5

Drawback of Algebraic Manipulation No clear steps in the manipulation process Not clear which terms should be grouped together Not clear which property of Boolean algebra should be used next Does not always guarantee a minimal expression Simplified expression may or may not be minimal Different steps might lead to different non-minimal expressions However, the goal is to minimize a Boolean function Minimize the number of literals in the Boolean expression The literal count is a good measure of the cost of logic implementation Proportional to the number of transistors in the circuit implementation The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 6

Karnaugh Map Called also K-map for short The Karnaugh map is a diagram made up of squares It is a reorganized version of the truth table Each square in the Karnaugh map represents a minterm Adjacent squares differ in the value of one variable Simplified expressions can be derived from the Karnaugh map By recognizing patterns of squares Simplified sum-of-products expression (AND-OR circuits) Simplified product-of-sums expression (OR-AND circuits) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 7

Next... Boolean Function Minimization The Karnaugh Map (K-Map) Two, Three, and Four-Variable K-Maps Prime and Essential Prime Implicants Minimal Sum-of-Products and Product-of-Sums Don't Cares Five and Six-Variable K-Maps Multiple Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 8

Two-Variable Karnaugh Map Minterms 0 and are adjacent (also, 2 and 3 ) They differ in the value of variable Minterms 0 and 2 are adjacent (also, and 3 ) They differ in the value of variable Two-variable K-map x y 0 x y 0 0 m 0 m 0 x' y' x' y m 2 m 3 x y' x y The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 9

From a Truth Table to Karnaugh Map Given a truth table, construct the corresponding K-map Copy the function values from the truth table into the K-map Make sure to copy each value into the proper K-map square Truth Table K-map x y f 0 0 0 0 x 0 y 0 0 0 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 0

K-Map Function Minimization Two adjacent cells containing 's can be combined = 0 + 2 + 3 =++ (6 literals) x 0 y K-map 0 0 0 + 2 =+=(+)= 2 + 3 =+=(+)= Therefore, can be simplified as: =+ (2 literals) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide

Three-Variable Karnaugh Map Have eight squares (for the 8 minterms), numbered 0 to 7 The last two columns are not in numeric order:, 0 Remember the numbering of the squares in the K-map Each square is adjacent to three other squares Minterms in adjacent squares can always be combined This is the key idea that makes the K-map work Labeling of rows and columns is also useful 00 0 0 00 0 0 0 0 3 2 0 4 5 7 6 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 2

Simplifying a Three-Variable Function Simplify the Boolean function: (,,)= (3,4,5,7) =+++ (2 literals). Mark all the K-map squares that represent function 2. Find possible adjacent squares 00 0 0 + =(+) = 0 0 0 0 + =(+)= 0 Therefore, =+ (4 literals) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 3

Simplifying a Three-Variable Function (2) Here is a second example: (,,)= (3,4,6,7) =+++ (2 literals) Learn the locations of the 8 indices based on the variable order + =(+) = 00 0 0 Corner squares can be combined 0 0 0 0 +=(+)= 0 Therefore, = + (4 literals) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 4

Combining Squares on a 3-Variable K-Map By combining squares, we reduce number of literals in a product term, thereby reducing the cost On a 3-variable K-Map: One square represents a minterm with 3 variables Two adjacent squares represent a term with 2 variables Four adjacent squares represent a term with variable Eight adjacent square is the constant (no variables) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 5

Example of Combining Squares Consider the Boolean function: (,,)= (2,3,5,6,7) =++++ The four minterms that form 00 0 0 the 2 2 red square are 0 0 0 reduced to the term 0 The two minterms that form the blue rectangle are + ++ reduced to the term =(+)+(+) Therefore: =+ =+ =(+) = The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 6

Minimal Sum-of-Products Expression Consider the function: (,,)= (0,,2,4,6,7) Find a minimal sum-of-products (SOP) expression Solution: Red block: term = 0 00 0 0 0 Green block: term = 0 Blue block: term = Minimal sum-of-products: = + + (5 literals) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 7

Four-Variable Karnaugh Map 4 variables 6 squares Remember the numbering of the squares in the K-map Each square is adjacent to four other squares = = = = " = = # = = $ = % = = = = = " = = 00 0 0 & & Notice the order of Rows and 0 and the order of columns and 0 00 0 " # 0 " $ % The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 8

Combining Squares on a 4-Variable K-Map On a 4-variable K-Map: One square represents a minterm with 4 variables Two adjacent squares represent a term with 3 variables Four adjacent squares represent a term with 2 variables Eight adjacent squares represent a term with variable Combining all 6 squares is the constant (no variables) The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 9

Combining Eight Squares 00 0 0 Term = Term = & & 00 0 0 " # " $ % Term = The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 20

Combining Four Squares 00 0 0 Term = & & 00 0 0 " # " $ % Term = Term = The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 2

Combining Two Squares 00 & Term = 0 & 0 Term = 00 0 0 " # " $ % Term = Term = The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 22

Simplifying a 4-Variable Function Given (,,,)= (0,2,4,5,6,7,8,2) Draw the K-map for function Minimize as sum-of-products Solution: 00 =++ & 0 Term = & Term = 0 Term = 00 0 0 0 0 0 0 0 0 0 0 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 23

Next... Boolean Function Minimization The Karnaugh Map (K-Map) Two, Three, and Four-Variable K-Maps Prime and Essential Prime Implicants Minimal Sum-of-Products and Product-of-Sums Don't Cares Five and Six-Variable K-Maps Multiple Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 24

Prime Implicants Prime Implicant: a product term obtained by combining the maximum number of adjacent squares in the K-map The number of combined squares must be a power of 2 Essential Prime Implicant: is a prime implicant that covers at least one minterm not covered by the other prime implicants The prime implicants and essential prime implicants can be determined by inspecting the K-map The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 25

Example of Prime Implicants Find all the prime implicants and essential prime implicants for: ((,),*,+)= (0,2,3,5,7,8,9,0,,3,5) K-Map 00 0 0 () *+ )+ 00 )+ 0 0 () (+ ) * *+ Six Prime Implicants )+,)+,(),(+,*+,)* Only Two Prime Implicants are essential )+ and ) + The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 26

Simplification Procedure Using the K-Map. Find all the essential prime implicants Covering maximum number (power of 2) of 's in the K-map Mark the minterm(s) that make the prime implicants essential 2. Add prime implicants to cover the function Choose a minimal subset of prime implicants that cover all remaining 's Make sure to cover all 's not covered by the essential prime implicants Minimize the overlap among the additional prime implicants Sometimes, a function has multiple simplified expressions You may be asked to list all the simplified sum-of-product expressions The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 27

Obtaining All Minimal SOP Expressions Consider again: ((,),*,+)= (0,2,3,5,7,8,9,0,,3,5) Obtain all minimal sum-of-products (SOP) expressions )+ )+ () *+ 00 0 0 00 0 K-Map 0 () (+ ) * *+ Two essential Prime Implicants: )+ and ) + Four possible solutions: =)++)++*++(+ =)++)++*++() =)++)++)*+() =)++)++)*+(+ The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 28

Product-of-Sums (POS) Simplification All previous examples were expressed in Sum-of-Products form With a minor modification, the Product-of-Sums can be obtained Example: ((,),*,+)= (,2,3,9,0,,3,4,5) K-Map of - K-Map of - () *+ 00 0 0 00 All prime 0 implicants 0 =(++(*+)++)* Minimal Sum-of-Products = 8 literals are essential () *+ 00 0 0 00 0 0 =* + +( ) =(*++)((+) ) Minimal Product-of-Sums = 4 literals The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 29

Product-of-Sums Simplification Procedure. Draw the K-map for the function Obtain a minimal Sum-of-Products (SOP) expression for 2. Draw the K-map for, replacing the 0's of with 's in 3. Obtain a minimal Sum-of-Products (SOP) expression for 4. Use DeMorgan's theorem to obtain =() The result is a minimal Product-of-Sums (POS) expression for 5. Compare the cost of the minimal SOP and POS expressions Count the number of literals to find which expression is minimal The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 30

Next... Boolean Function Minimization The Karnaugh Map (K-Map) Two, Three, and Four-Variable K-Maps Prime and Essential Prime Implicants Minimal Sum-of-Products and Product-of-Sums Don't Cares Five and Six-Variable K-Maps Multiple Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 3

Don't Cares Sometimes, a function table may contain entries for which: The input values of the variables will never occur, or The output value of the function is never used In this case, the output value of the function is not defined The output value of the function is called a don't care A don't care is an X value that appears in the function table The X value can be later chosen to be 0 or To minimize the function implementation The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 32

Example of a Function with Don't Cares Consider a function defined over BCD inputs The function input is a BCD digit from 0 to 9 The function output is 0 if the BCD input is 0 to 4 The function output is if the BCD input is 5 to 9 The function output is X (don't care) if the input is 0 to 5 (not BCD) = / 5,6,7,8,9 +.(0,,2,3,4,5) Minterms Don't Cares Truth Table a b c d f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X 0 X 0 0 X 0 X 0 X X The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 33

Minimizing Functions with Don't Cares Consider: = / 5,6,7,8,9 +.(0,,2,3,4,5) If the don't cares were treated as 0's we get: =()++()*+()* (9 literals) If the don't cares were treated as 's we get: =(+)++)* (5 literals) The don't care values can be selected to be either 0 or, to produce a minimal expression () *+ 00 0 0 K-Map of - 00 0 0 0 0 X 0 0 0 X X X X X The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 34

Simplification Procedure with Don't Cares. Find all the essential prime implicants Covering maximum number (power of 2) of 's and X's (don't cares) Mark the 's that make the prime implicants essential 2. Add prime implicants to cover the function Choose a minimal subset of prime implicants that cover all remaining 's Make sure to cover all 's not covered by the essential prime implicants Minimize the overlap among the additional prime implicants You need not cover all the don't cares (some can remain uncovered) Sometimes, a function has multiple simplified expressions The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 35

Minimizing Functions with Don't Cares (2) Simplify: 0 = /,3,7,,5 +.(0,2,5) Solution :0=*++() (4 literals) Solution 2:0=*++( + (4 literals) Prime Implicant*+ is essential () *+ 00 0 0 K-Map of 00 0 0 X X 0 X 0 0 0 0 0 0 0 () *+ 00 0 0 K-Map of 00 0 0 X X 0 X 0 0 0 0 0 0 0 Not all don't cares need be covered The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 36

Minimal Product-of-Sums with Don't Cares Simplify: 0 = /,3,7,,5 +.(0,2,5) Obtain a product-of-sums minimal expression Solution:0= / 4,6,8,9,0,2,3,4 +.(0,2,5) Minimal 0=++(* (3 literals) Minimal product-of-sums: 0 =+(( +*) (3 literals) The minimal sum-of-products expression for 0 had 4 literals () *+ 00 0 0 K-Map of 00 0 0 X 0 0 X X 0 0 0 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 37

Next... Boolean Function Minimization The Karnaugh Map (K-Map) Two, Three, and Four-Variable K-Maps Prime and Essential Prime Implicants Minimal Sum-of-Products and Product-of-Sums Don't Cares Five and Six-Variable K-Maps Multiple Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 38

Five-Variable Karnaugh Map Consists of 2 5 = 32 squares, numbered 0 to 3 Remember the numbering of squares in the K-map Can be visualized as two layers of 6 squares each Top layer contains the squares of the first 6 minterms (( =0) Bottom layer contains the squares of the last 6 minterms (( =) )* +2 00 0 0 ( =0 00 0 0 " # " $ % )* +2 00 0 0 ( = 00 0 0 # % $ $ % " # Each square is adjacent to 5 other squares: 4 in the same layer and in the other layer: 0 is adjacent to 6 is adjacent to 7 4 is adjacent to 20 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 39

Example of a Five-Variable K-Map Given: ((,),*,+,2)= (0,,8,9,6,7,22,23,24,25) Draw the 5-Variable K-Map Obtain a minimal Sum-of-Products expression for Solution: = *++()*+ (6 literals) )* +2 5-Variable K-Map ( =0 +2 00 0 0 )* ( = 00 0 0 *+ 00 0 00 0 () *+ 0 0 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 40

Five-Variable K-Map with Don't Cares 0((,),*,+,2)= /(3,6,7,,24,25,27,28,29)+.(2,8,9,2,3,26) Draw the 5-Variable K-Map Obtain a minimal Sum-of-Products expression for 0 Solution:0 =)+ +( ) ++)* 2 (8 literals) ()+ )+ +2 )* 00 0 5-Variable K-Map ( =0 +2 00 0 0 )* X 00 0 X X ( = 00 0 0 All prime implicants are essential )* 2 0 X X 0 X Not covered The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 4

Six-Variable Karnaugh Map Consists of 2 6 = 64 squares, numbered 0 to 63 Can be visualized as four layers of 6 squares each Four layers: () =00,0,,0 (Notice that layer comes before 0) Each square is adjacent to 6 other squares: 4 squares in the same layer and 2 squares in the above and below layers *+ 2 () =00 00 0 0 () =0 00 0 0 () = 00 0 0 () =0 00 0 0 00 # % $ "$ "% " 0 " # " # % $ " $ % # # # # "" " " "# 0 $ % " # # % $ " " " " The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 42

Example of a Six-Variable K-Map h((,),*,+,2,)= (2,0,,8,2,23,29,3,34,4,50,53,55,6,63) Draw the 6-Variable K-Map Obtain a minimal Sum-of-Products expression for h Solution:h = * + 2 +) + +( ) * + 2+( )* + 2 (8 literals) *+ 2 00 () =00 () =0 () = 00 0 0 00 0 0 00 0 0 *+2 () =0 00 0 0 0 )+ 0 ( ) * + 2 ( ) * + 2 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 43

Next... Boolean Function Minimization The Karnaugh Map (K-Map) Two, Three, and Four-Variable K-Maps Prime and Essential Prime Implicants Minimal Sum-of-Products and Product-of-Sums Don't Cares Five and Six-Variable K-Maps Multiple Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 44

Multiple Outputs Suppose we have two functions: ((,),*) and 0((,),*) Same inputs: (,),*, but two outputs: and 0 We can minimize each function separately, or Minimize and 0 as one circuit with two outputs The idea is to share terms (gates) among and 0 ( ) * ( ) * 0 Two separate circuits ( ) * 0 One circuit with Two Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 45

Multiple Outputs: Example Given: (,),* = (0,2,6,7) and 0 (,),* = (,3,6,7) Minimize each function separately Minimize both functions as one circuit )* ( 0 K-Map of - 00 0 0 0 0 0 0 =(*+() ( * ( ) ( * ( ) 0 One circuit per function )* ( 0 K-Map of 00 0 0 0 0 0 0 Common Term = () 0 =(*+() ( * ( ) ( * 0 One circuit with two Outputs The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 46

Multiple Outputs: Example 2 (,),*,+ = (3,5,7,0,,4,5), 0 (,),*,+ = (,3,5,7,0,4) Draw the K-map and write minimal SOP expressions of and 0 =()++(*+*+ 0 =(++(*+ Extract the common terms of and 0 () *+ 00 K-Map of - 00 0 0 () *+ 00 K-Map of 00 0 0 Common Terms 4 =(+ and 4 =(* 0 0 Minimal and 0 =4 )+4 +*+ 0 0 0 =4 +4 + The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 47

Common Terms Shared Gates Minimal =()++(*+*+ Minimal 0 =(++(*+ Let 4 =(+ and 4 =(* (shared by and 0) Minimal =4 )+4 +*+, Minimal 0 =4 +4 + * + ( ) + ( * * + ) ( + ( + ( * + NO Shared Gates 0 ( * + One Circuit Two Shared Gates 0 The Karnaugh Map COE 202 Digital Logic Design Muhamed Mudawar slide 48