Karnaugh Maps. Ioan Despi. University of New England. September 13, 2013

Similar documents
Review: Standard forms of expressions

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

Standard Forms of Expression. Minterms and Maxterms

Karnaugh Maps. Kiril Solovey. Tel-Aviv University, Israel. April 8, Kiril Solovey (TAU) Karnaugh Maps April 8, / 22

A B AB CD Objectives:

Digital Logic Lecture 7 Gate Level Minimization

Gate Level Minimization Map Method

Digital Design. Chapter 4. Principles Of. Simplification of Boolean Functions

Chapter 3. Boolean Algebra and Digital Logic

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

9/10/2016. ECE 120: Introduction to Computing. The Domain of a Boolean Function is a Hypercube. List All Implicants for One Variable A

Simplification of Boolean Functions

Gate Level Minimization

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

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

Module -7. Karnaugh Maps

Standard Boolean Forms

Contents. Chapter 3 Combinational Circuits Page 1 of 34

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 04. Boolean Expression Simplification and Implementation

Chapter 3. Gate-Level Minimization. Outlines

Gate-Level Minimization

Outcomes. Unit 9. Logic Function Synthesis KARNAUGH MAPS. Implementing Combinational Functions with Karnaugh Maps

Simplification of Boolean Functions

True/False. MATH 1C: SAMPLE EXAM 1 c Jeffrey A. Anderson ANSWER KEY

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Chapter 2 Combinational

Gate-Level Minimization

Circuit analysis summary

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

ENGIN 112 Intro to Electrical and Computer Engineering

Experiment 4 Boolean Functions Implementation

Chapter 3 Simplification of Boolean functions

Gate-Level Minimization

Boolean algebra. June 17, Howard Huang 1

A graphical method of simplifying logic

X Y Z F=X+Y+Z

Unit-IV Boolean Algebra


Karnaugh Map (K-Map) Karnaugh Map. Karnaugh Map Examples. Ch. 2.4 Ch. 2.5 Simplification using K-map

Combinational Logic & Circuits

Math 414 Lecture 30. The greedy algorithm provides the initial transportation matrix.

IT 201 Digital System Design Module II Notes

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

Homework. Update on website issue Reading: Chapter 7 Homework: All exercises at end of Chapter 7 Due 9/26

Lecture 4: Implementation AND, OR, NOT Gates and Complement

UNIT II. Circuit minimization

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

Specifying logic functions

Boolean logic. Boolean Algebra. Introduction to Computer Yung-Yu Chuang NOT AND NOT

Digital Logic Design. Outline

Basic circuit analysis and design. Circuit analysis. Write algebraic expressions or make a truth table

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

Graduate Institute of Electronics Engineering, NTU. CH5 Karnaugh Maps. Lecturer: 吳安宇教授 Date:2006/10/20 ACCESS IC LAB

Switching Circuits & Logic Design

Binary logic. Dr.Abu-Arqoub

Boolean Logic CS.352.F12

5. Minimizing Circuits

Simplification of two-level combinational logic

Computer Engineering Chapter 3 Boolean Algebra

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

Computer Organization

1.2 Venn Diagrams and Partitions

Experiment 3: Logic Simplification

Combinational Logic Circuits

Permutation Matrices. Permutation Matrices. Permutation Matrices. Permutation Matrices. Isomorphisms of Graphs. 19 Nov 2015

Computer Science. Unit-4: Introduction to Boolean Algebra

Introduction to Boolean logic and Logical Gates

BOOLEAN ALGEBRA. 1. State & Verify Laws by using :

Chapter 2. Boolean Expressions:

Making a Venn diagram look like a Karnaugh map

Synthesis of 2-level Logic Heuristic Method. Two Approaches

Boolean Algebra and Logic Gates

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

CprE 281: Digital Logic

Choose the best answer. For 1 3, use the figure. For 4 5, use the figure. Which face is parallel to face DEF? BCEF

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

(Refer Slide Time: 00:01:53)

DSAS Laboratory no 4. Laboratory 4. Logic forms

CSCI 220: Computer Architecture I Instructor: Pranava K. Jha. Simplification of Boolean Functions using a Karnaugh Map

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Combinational Logic with MSI and LSI

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Incompletely Specified Functions with Don t Cares 2-Level Transformation Review Boolean Cube Karnaugh-Map Representation and Methods Examples

Gate-Level Minimization

Direction Fields; Euler s Method

ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

Solid Problem Ten. In this chapter, you will learn the following to World Class standards:

CS8803: Advanced Digital Design for Embedded Hardware

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

Introduction to Microprocessors and Digital Logic (ME262) Boolean Algebra and Logic Equations. Spring 2011

EE6301 DIGITAL LOGIC CIRCUITS UNIT IV ASYNCHRONOUS SEQUENTIAL CIRCUITSAND PROGRAMMABLE LOGIC DEVICES PART A

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Updated: March 31, 2016 Calculus III Section Math 232. Calculus III. Brian Veitch Fall 2015 Northern Illinois University

Vector Calculus: Understanding the Cross Product

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Interpolation is a basic tool used extensively in tasks such as zooming, shrinking, rotating, and geometric corrections.

CSE 140: Logic Minimization Lecture

Normal Forms Boolean Satisfiability Sectoins 5.3 and 5.5. Prof. Sandy Irani

Transcription:

Karnaugh Maps Ioan Despi despi@turing.une.edu.au University of New England September 13, 2013

Outline Ioan Despi AMTH140 2 of 1

Motivation Ioan Despi AMTH140 3 of 1 The Karnaugh map provides a pictorial technique to simplify Boolean expressions using the axiom a + a = 1 and occasionally the property a + a = a. One of the fundamental algorithms in the field of CAD, Karnaugh maps are used for many small design problems and constitute the starting point for many other algorithms. The ideea is to visualise adjacency in Boolean space by using a projection of an n-dimensional hypercube onto two-dimensional rectangle such that adjacent points in the hypercube remain adjacent in the projection.

Grid Layout Ioan Despi AMTH140 4 of 1 Two product terms are said to be adjacent, if they differ by exactly one literal and if this literal appears in one product and its complement in the other. For example, wx y z and wx yz are adjacent (notice y and y ). Since a Boolean expression has a canonical form, we draw a grid or table such that all possible standard products have a unique position or box in the grid. For example, Boolean expression f(x, y, z) may be associated with the grid z z xy xy x y x y in which the terms on the edges of the grid serve as labels.

Grid Layout Ioan Despi AMTH140 5 of 1 More specifically, a special case of Boolean expression xy + y z, for instance, has the canonical form xy + y z = xy(z + z ) + y z(x + x ) = xyz + xyz + xy z + x y z which can be represented by placing a 1 in the corresponding box in the above grid for each standard product term in the canonical form, leaving the rest of the boxes (if any) empty or filled with 0. The finished grid here, called a Karnaugh map, reads xy xy x y x y z 1 1 1 z 1

Grid Layout Ioan Despi AMTH140 6 of 1 The grids for Karnaugh maps should satisfy each standard product term is uniquely represented by a box, adjacent boxes (vertically or horizontally or in other legal directions) represent adjacent product terms, each box has exactly n neighbours (adjacent product terms) if the Boolean expression has exactly n variables.

Ioan Despi AMTH140 7 of 1 Example 1. For Boolean expressions with variables x, y and z, z z xy xy x y x y 2 1 3 3 neighbours and z z y x y x yx yx are both valid grids, and there are other possible valid grids as well.

Ioan Despi AMTH140 8 of 1 Example 2. For a Boolean expression with 4 variables w, x, y and z, a typical valid grid would be yz yz y z y z wx wx w x w x 2 1 3 4 where 1, 2, 3, and 4 are the 4 neighbours of the shaded box.

Ioan Despi AMTH140 9 of 1 Example 3. For a Boolean expression with 5 variables v, w, x, y and z, the following grid yz yz y z y z vwx vwx vw x vw x v w x v w x v wx v wx 4 2 1 3 5 is a typical grid and shaded box has 5 neighbours 1, 2,..., 5.

Block Ioan Despi AMTH140 10 of 1 The main feature of a Karnaugh map is that any block of boxes (of 1 ) can be represented by a single product term if the number of boxes in each dimension or direction is of the form 2 m for some m N. In fact, we ll reserve the word block exclusively for this sense. A block of 2 M boxes in a Boolean expression of N variables can be represented by a single product term with N M literals. If a variable changes when we move inside a block, the literals related to the variable will not exist in the reduced single product term.

Ioan Despi AMTH140 11 of 1 Example 4. The circled area in the Karnaugh map is a 2 2 block representing z z xy xy x y x y 1 1 1 1 virtually connected x changes inside the block z changes inside the block xyz + xyz + x yz + x yz = xy(z + z ) + x y(z + z ) = xy + x y = (x + x )y = y In other words, the block of 4 is simplified to a single product term y (with 1 = N M = 3 2 literals)

Ioan Despi AMTH140 12 of 1 Example 5. The circled area in the Karnaugh map wx wx w x w x yz yz y z y z 1 1 1 1 1 1 1 1 is a 2 4 block representing z. Notice that in a typical term w x y z in the block, the variable names w, x and y may change inside the circled block, and are thus not present in the final product term which becomes z. vertically wrapped around

Ioan Despi AMTH140 13 of 1 Simplification Procedure The procedure for simplifying a Boolean expression via Karnaugh map is: Simplification Procedure (i) Write the expression in terms of standard product terms, that is, in canonical form. (ii) Place a 1 in the box corresponding to each standard product term. (iii) Circle isolated 1 s. (iv) Circle 2 adjacent 1 s (pairs in any direction, or blocks of 2) such that the newly circled 1 s can t be contained in a block of 4. Use as few circles as possible. (v) Circle any blocks of 4 (containing at least one uncircled 1) such that the newly circled 1 s can t be contained in a block of 8. Use as few circles as possible. (vi) Circle blocks of 2 n (n 3) boxes similar to (v). Then the simplified expression can be read off the Karnaugh map with each circle representing one product term. The term that changes, from x to x say, within a circle is the one that disappears. The final result is a minimal representation of the Boolean expression.

(e) No blocks of 4 means no blocks of 2 m for m 2. In the circle in the first row x changes to x so it disappears, leaving yz. In the other circle, y changes, so it goes leaving x z. Thus the minimal representation can be read off as yz + x z. Ioan Despi AMTH140 14 of 1 Example 6. Use a Karnaugh map to simplify F = xyz + x y + x y z. Solution. (a) F = xyz + x yz + x yz + x y z is the canonical form. xy xy x y x y (b) z 1 1 z 1 1 (c) No isolated 1 s. (d) No blocks of 4. But there are pairing choices. We select least number of pairs. xy xy x y x y z 1 1 z 1 1

Example 7. Suppose a Boolean expression can be represented by the following Karnaugh map wx wx w x w x yz 1 1 1 1 yz 1 1 y z 1 1 1 y z 1 1 Solution. Then the simplification procedure is as follows. (a) No isolated 1 s. (b) Only 2 possible pairs exist, that can t be included in a block of 4 (1 s). Since a 2nd pair will not cover any uncircled 1 s that will not be covered by blocks of 4, we need to pick just 1 pair. (c) No blocks of 8. But there are 3 blocks of 4, each covering new 1 s. The Karnaugh map now looks like Ioan Despi AMTH140 15 of 1 wx wx w x w x yz 1 1 1 1 yz y z 1 1 1 1 1 y z 1 1

Ioan Despi AMTH140 16 of 1 (d) Since no uncircled 1 s are left over the procedure is completed. wx wx w x w x yz 1 1 1 1 yz 1 1 y z 1 1 1 y z 1 1 In the circle in the first row both w and x change so they disappear, leaving yz. In the circle in the top left corner, x and z change so they go, leaving wy. And so on. The minimal representation is thus read off as wy + yz + w y + x y z

Ioan Despi AMTH140 17 of 1 Example 8. If one reverses the procedure and goes from big blocks to smaller ones, the results may not be minimal. For instance, with bigger block first, we would have to circle in the Karnaugh map below in the following order wx wx w x w x yz 1 wx wx w x w x yz 1 yz 1 1 1 t h e n yz 1 1 1 y z 1 1 1 y z 1 1 1 y z 1 y z 1 which gives 5 product terms (corresponding to 5 circles). However, if we drop the block of 4 circle, we still have all the 1 s circled. But the new and equivalent expression will only have 4 product terms.

Ioan Despi AMTH140 18 of 1 With our normal procedure, nevertheless, we ll arrive at the correct answer represented by wx wx w x w x yz 1 yz 1 1 1 y z 1 1 1 y z 1