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

Similar documents
Karnaugh Maps Objectives

UNIT 5 KARNAUGH MAPS Spring 2011

Simplifying Logic Circuits with Karnaugh Maps

This form sometimes used in logic circuit, example:

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

211: Computer Architecture Summer 2016

ELC224C. Karnaugh Maps

Optimizations and Tradeoffs. Combinational Logic Optimization

Chapter 2 Combinational Logic Circuits

CS221: Digital Design. Indian Institute of Technology Guwahati

Unit 2 Session - 6 Combinational Logic Circuits

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

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

Digital Logic Design. Combinational Logic

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

CHAPTER 5 KARNAUGH MAPS

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

Lecture 7: Karnaugh Map, Don t Cares

ENG2410 Digital Design Combinational Logic Circuits

Gate-Level Minimization

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

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

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

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

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

Karnaugh Map & Boolean Expression Simplification

Midterm1 Review. Jan 24 Armita

Karnaugh Maps (K-Maps)

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

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

Spiral 1 / Unit 5. Karnaugh Maps

Chapter 7 Logic Circuits

CHAPTER III BOOLEAN ALGEBRA

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

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

MC9211 Computer Organization

DIGITAL ELECTRONICS & it0203 Semester 3

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

Chapter 2 Combinational Logic Circuits

Combinatorial Logic Design Principles

CHAPTER III BOOLEAN ALGEBRA

Review for Test 1 : Ch1 5

Minimization techniques

ENGG 1203 Tutorial - 2 Recall Lab 2 - e.g. 4 input XOR. Parity checking (for interest) Recall : Simplification methods. Recall : Time Delay

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

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

Chapter 4 Optimized Implementation of Logic Functions

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

ﻮﻧﺭﺎﮐ ﺔﺸﻘﻧ ﺎﺑ ﻱﺯﺎﺳ ﻪﻨﻴﻬﺑ

CSE 140: Components and Design Techniques for Digital Systems

Introduction to Karnaugh Maps

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

Lecture 4: Four Input K-Maps

14:332:231 DIGITAL LOGIC DESIGN

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

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

Week-I. Combinational Logic & Circuits

CSE 140 Midterm I - Solution

Logic Design. Chapter 2: Introduction to Logic Circuits

K-map Definitions. abc

L2: Combinational Logic Design (Construction and Boolean Algebra)

Number System conversions

Chapter 2 Boolean Algebra and Logic Gates

Combinational Logic Fundamentals

Chap 2. Combinational Logic Circuits

WEEK 3.1 MORE ON KARNAUGH MAPS

Combinational Logic. Review of Combinational Logic 1

ELCT201: DIGITAL LOGIC DESIGN

Possible logic functions of two variables

Lecture 5. Karnaugh-Map

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

Chapter-2 BOOLEAN ALGEBRA

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

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

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

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

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

Chapter 2. Digital Logic Basics

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

Digital Circuit And Logic Design I. Lecture 4

L2: Combinational Logic Design (Construction and Boolean Algebra)

CPE100: Digital Logic Design I

Chapter 2 Combinational logic

L2: Combinational Logic Design (Construction and Boolean Algebra)

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

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

Unit 6. Quine-McClusky Method. Unit 6 1

Fundamentals of Computer Systems

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Combinational Logic Circuits Part II -Theoretical Foundations

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

CHAPTER1: Digital Logic Circuits Combination Circuits

Logic Design Combinational Circuits. Digital Computer Design

Logic Design I (17.341) Fall Lecture Outline

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

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

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

CPE100: Digital Logic Design I

Boolean Algebra and Logic Simplification

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

Transcription:

Karnaugh Maps مخطط آارنوف اعداد:محمد اسماعيل آلية علوم الحاسوب جامعة امدرمان الاهلية

الاهداء الي آل من يسلك طريق العلم والمعرفة في هذا المجال

Venn Diagrams Venn diagram to represent the space of minterms. Example of 2 variables (4 minterms): a'b' a ab' ab a'b b

Venn Diagrams Each set of minterms represents a Boolean function. Examples: { ab, ab' } ab + ab' = a(b+b') = a { a'b, ab } a'b + ab = (a'+a)b = b { ab } ab { ab, ab', a'b } ab + ab' + a'b = a + b a'b' { } 0 { a'b',ab,ab',a'b } 1 a ab' ab a'b b

What are Karnaugh Maps? simpler way to handle most (but not all) jobs of manipulating logic functions.

Karnaugh Map dvantages Minimization can be done more systematically Much simpler to find minimum solutions Easier to see what is happening (graphical) lmost always used instead of boolean minimization.

Gray Codes Gray code is a binary value encoding in which adjacent values only differ by one bit 2-bit Gray Code 00 01 11 10

.B +.B

F = BC + BC + BC + BC F ( a, b, c) = ab + bc

(,, ) m( 2,3,6,7 ) F a b c = F ( a, b, c) = ab + ab = b

(,,, ) m( 0, 2,3,6,8,12,13,15 ) F a b c d = F = abd + abc + acd + abd + acd (,,, ) = m( 0, 2,6,8,12,13,15 ) F a b c d + d ( 3,9,10) F = ac + ad + abd

Truth Table djacencies F = F = B Key idea: B F 0 0 1 0 1 1 1 0 0 1 1 0 B F 0 0 0 0 1 1 1 0 0 1 1 1 These are adjacent in a gray code sense - they differ by 1 bit We can apply XY + XY = X B + B = (B +B) = (1) = Same idea: B + B = B Problem: Gray code adjacency allows use of simplification theorems Physical adjacency in truth table does not indicate gray code adjacency

2-Variable Karnaugh Map B F 0 0 0 1 1 0 1 1 B 0 1 =0, B=0 0 1 =1, B=0 =0, B=1 =1, B=1 different way to draw a truth table: by folding it

Karnaugh Map In a K-map, physical adjacency does imply gray code adjacency B 0 1 0 1 0 1 1 0 B 0 1 0 0 0 1 1 1 F = B + B = F = B + B = B

2-Variable Karnaugh Map B F 0 0 1 0 1 1 1 0 0 1 1 0

2-Variable Karnaugh Map B F 0 0 1 0 1 1 1 0 0 1 1 0 B 0 1 0 1

2-Variable Karnaugh Map B F 0 0 1 0 1 1 1 0 0 1 1 0 B 0 1 0 1 1 1

2-Variable Karnaugh Map B F 0 0 1 0 1 1 1 0 0 1 1 0 B 0 1 0 1 0 1 1 0

2-Variable Karnaugh Map B F 0 0 1 0 1 1 1 0 0 1 1 0 B 0 1 0 1 0 1 1 0 F = B + B =

2-Variable Karnaugh Map B F 0 0 1 0 1 1 1 0 0 1 1 0 B 0 1 0 1 0 1 1 0 = 0 F =

nother Example B F 0 0 0 0 1 1 1 0 1 1 1 1 B 0 1 0 0 1 1 1 1 F = B + B + B = ( B + B) + (B + B) = + B

nother Example B F 0 0 0 0 1 1 1 0 1 1 1 1 B 0 1 B = 1 0 0 1 1 1 1 F = + B = 1

Yet nother Example B F 0 0 1 0 1 1 1 0 1 1 1 1 B 0 1 0 1 1 1 1 1 F = 1 Groups of more than two 1 s can be combined

Example 2-variable Karnaugh maps are trivial but can be used to introduce the methods you need to learn. The map for a 2-input OR gate looks like this: 0 1 B B Y 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 B +B 1 1

3-Variable Karnaugh Map Showing Minterm Locations Note the order of the B C variables: 0 0 0 1 1 1 1 0 BC 0 1 00 01 11 10 BC = 101 BC = 010

3-Variable Karnaugh Map Showing Minterm Locations Note the order of the B C variables: 0 0 0 1 1 1 1 0 BC 0 1 00 m0 m4 01 m1 m5 11 m3 m7 10 m2 m6 BC = 101 BC = 010

djacencies djacent squares differ by exactly one variable BC 0 1 00 B'C' 01 'B'C B'C There is wrap-around: top and bottom rows are adjacent 11 BC 10 BC'

Truth Table to Karnaugh Map B C F 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 BC 0 1 00 01 11 10 0 0 0 1 1 1 1 0

Minimization Example BC 0 1 00 0 0 B C+BC = C 01 0 1 11 1 1 10 1 0 BC+ BC = B F = B + C

nother Example BC 0 1 00 0 1 B C+ BC = C 01 1 0 11 1 0 10 0 1 B C +BC = C F = C + C = C

Minterm Expansion to K-Map F = Σm( 1, 3, 4, 6 ) BC 0 1 BC 0 1 00 m0 m4 00 0 1 01 m1 m5 01 1 0 11 m3 m7 11 1 0 10 m2 m6 10 0 1 Minterms are the 1 s, everything else is 0

Maxterm Expansion to KMap F = ПM( 0, 2, 5, 7 ) BC 0 1 BC 0 1 00 M0 M4 00 0 1 01 M1 M5 01 1 0 11 M3 M7 11 1 0 10 M2 M6 10 0 1 Maxterms are the 0 s, everything else is 1

Yet nother Example B C +B C + B C+B C = B BC 0 1 00 1 1 01 1 1 11 0 1 10 0 0 2 n 1 s can be circled at a time 1, 2, 4, 8, OK 3 not OK B C+BC = C F = B + C The larger the group of 1 s the simpler the resulting product term

Boolean lgebra to Karnaugh Map BC 0 1 00 01 11 10 Plot: ab c + bc + a

Boolean lgebra to Karnaugh Map BC 0 1 00 1 01 11 10 Plot: ab c + bc + a

Boolean lgebra to Karnaugh Map BC 0 1 00 1 01 11 1 1 10 Plot: ab c + bc + a

Boolean lgebra to Karnaugh Map BC 0 1 00 1 1 01 1 11 1 1 10 1 Plot: ab c + bc + a

Boolean lgebra to Karnaugh Map BC 0 1 00 1 1 Plot: ab c + bc + a 01 1 0 11 1 1 10 1 0 Remaining spaces are 0

Boolean lgebra to Karnaugh Map Now minimize... BC 0 1 00 1 1 01 1 0 11 1 1 10 1 0 F = B C + BC + This is a simpler equation than we started with. Do you see how we obtained it?

Mapping Sum of Product Terms The 3-variable map has 12 possible groups of 2 spaces These become terms with 2 literals BC 0 1 00 01 11 10 BC 0 1 00 01 11 10 BC 0 1 00 01 11 10

Mapping Sum of Product Terms The 3-variable map has 6 possible groups of 4 spaces These become terms with 1 literal BC 0 1 00 01 11 10 BC 0 1 00 01 11 10 BC 0 1 00 01 11 10

4-Variable Karnaugh Map B B CD 00 01 11 10 CD 00 01 11 10 00 m0 m4 m12 m8 01 m1 m5 m13 m9 11 m3 m7 m15 m11 00 0 0 0 1 01 1 1 1 1 11 1 1 1 1 B C 10 m2 m6 m14 m10 10 0 1 0 0 D BC F = BC + B C + D Note the row and column orderings. Required for adjacency

Find a POS Solution B BC CD 00 01 11 10 00 1 0 0 1 C D 01 0 0 0 0 11 1 1 1 1 10 1 1 1 0 F = C D + BC + B CD F = (C+D )(B +C)( +B+C +D) B CD Find solutions to groups of 0 s to find F Invert to get F then use DeMorgan s

Dealing With Don t Cares F = Σm(1, 3, 7) + Σd(0, 5) BC 0 1 00 01 11 10

Dealing With Don t Cares F = Σm(1, 3, 7) + Σd(0, 5) BC 0 1 00 x 0 B C+B C+ BC+BC = C 01 1 x 11 1 1 10 0 0 F = C Circle the x s that help get bigger groups of 1 s (or 0 s if POS) Don t circle the x s that don t

Minimal K-Map Solutions Some Terminology and n lgorithm to Find Them

Prime Implicants group of one or more 1 s which are adjacent and can be combined on a Karnaugh Map is called an implicant. The biggest group of 1 s which can be circled to cover a given 1 is called a prime implicant. They are the only implicants we care about.

Prime Implicants B CD 00 01 11 10 00 0 0 0 1 01 0 0 1 1 11 0 1 1 1 10 0 1 1 1 Prime Implicants Non-prime Implicants re there any additional prime implicants in the map that are not shown above?

ll The Prime Implicants B CD 00 01 11 10 00 0 0 0 1 Prime Implicants 01 0 0 1 1 11 0 1 1 1 10 0 1 1 1 When looking for a minimal solution only circle prime implicants minimal solution will never contain non-prime implicants

B Essential Prime Implicants CD 00 01 11 10 00 0 0 0 1 01 0 0 1 1 11 0 1 1 1 10 0 1 1 1 Not all prime implicants are required prime implicant which is the only cover of some 1 is essential a minimal solution requires it. Essential Prime Implicants Non-essential Prime Implicants

Minimal Solution Example B CD 00 01 11 10 00 0 0 0 1 01 0 0 1 1 11 0 1 1 1 10 0 1 1 1 F = B + BC + D Minimum Not required

nother Example B CD 00 01 11 10 00 1 0 0 1 01 1 1 0 0 11 1 1 1 0 10 1 0 0 1

nother Example B CD 00 01 11 10 00 1 0 0 1 01 1 1 0 0 11 1 1 1 0 F = D + BCD + B D Minimum 10 1 0 0 1 B is not required Every one one of its locations is covered by multiple implicants fter choosing essentials, everything is covered

Finding the Minimum Sum of Products 1. Find each essential prime implicant and include it in the solution. 2. Determine if any minterms are not yet covered. 3. Find the minimal # of remaining prime implicants which finish the cover.

Yet nother Example (Use of non-essential primes) B CD 00 01 11 10 00 1 1 0 0 01 0 0 1 1 11 1 1 1 1 10 1 1 0 0

Yet nother Example (Use of non-essential primes) B C CD 00 01 11 10 00 1 1 0 0 01 0 0 1 1 11 1 1 1 1 10 1 1 0 0 D CD Essentials: D and D Non-essentials: C and CD Solution: D + D + C or D + D + CD D

K-Map Solution Summary Identify prime implicants dd essentials to solution Find a minimum # non-essentials required to cover rest of map

5- and 6-Variable K-Maps

5-Variable Karnaugh Map BC DE 00 01 11 10 00 m0 m4 m12 m8 01 m1 m5 m13 m9 11 m3 m7 m15 m11 10 m2 m6 m14 m10 BC DE 00 01 11 10 00 m16 m20 m28 m24 01 m17 m21 m29 m25 11 m19 m23 m31 m27 10 m18 m22 m30 m26 This is the =0 plane This is the =1 plane The planes are adjacent to one another (one is above the other in 3D)

Some Implicants in a 5-Variable KMap BC BC DE 00 01 11 10 00 1 1 1 1 01 0 0 0 0 11 0 0 1 0 DE 00 01 11 10 00 1 1 1 1 01 0 0 0 0 11 1 0 0 1 10 1 0 1 0 D E =0 =1 BCD 10 1 0 0 0 B C D BC DE B C DE Some of these are not prime

5-Variable KMap Example Find the minimum sum-of-products for: F = Σ m (0,1,4,5,11,14,15,16,17,20,21,30,31) BC DE 00 01 11 10 00 01 11 10 BC DE 00 01 11 10 00 01 11 10 =0 =1

5-Variable KMap Example Find the minimum sum-of-products for: F = Σ m (0,1,4,5,11,14,15,16,17,20,21,30,31) BC DE 00 01 11 10 00 1 1 0 0 01 1 1 0 0 11 0 0 1 1 10 0 0 1 0 BC DE 00 01 11 10 00 1 1 0 0 01 1 1 0 0 11 0 0 1 0 10 0 0 1 0 =0 =1 F = B D + BCD + BDE

CD 6-Variable Karnaugh Map CD EF 00 01 11 10 00 m0 m4 m12 m8 EF 00 01 11 10 00 m32 m36 m44 m40 B=00 01 m1 m5 m13 m9 01 m33 m37 m45 m41 B=10 11 m3 m7 m15 m11 11 m35 m39 m47 m43 10 m2 m6 m14 m10 10 m34 m38 m46 m42 CD CD EF 00 01 11 10 00 m16 m20 m28 m24 EF 00 01 11 10 00 m48 m52 m60 m56 B=01 01 m17 m21 m29 m25 01 m49 m53 m61 m57 B=11 11 m19 m23 m31 m27 11 m51 m55 m63 m59 10 m18 m22 m30 m26 10 m50 m54 m62 m58

CD EF 00 01 11 10 00 0 0 0 0 CD EF 00 01 11 10 00 1 0 0 0 B=00 01 0 0 0 0 11 0 0 1 0 01 1 0 0 0 11 1 0 1 0 B=10 10 0 0 0 0 10 1 0 0 0 CD CD EF 00 01 11 10 00 0 0 0 0 EF 00 01 11 10 00 1 0 0 0 B=01 01 0 0 0 0 11 0 0 1 0 01 1 0 0 0 11 1 0 1 0 B=11 10 0 0 0 0 10 1 0 0 0 Solution = C D + CDEF = C D = CDEF

KMap Summary Kmap is simply a folded truth table where physical adjacency implies logical adjacency KMaps are most commonly used hand method for logic minimization KMaps have other uses for visualizing Boolean equations you may see some later.