Karnaugh Maps References: Lecture 4 from last semester

Slides:



Advertisements
Similar presentations
Digital Circuits.
Advertisements

Prof. Sin-Min Lee Department of Computer Science
ECE 238L Computer Logic Design Spring 2010
Karnaugh Maps for Simplification
4/11/03 Minute Paper How does MS window work? Like how do we have the screen on the computer. Is it just a bunch of Binary #’s representing colors? When.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
PHY 201 (Blum)1 Karnaugh Maps References: Chapters 4 and 5 in Digital Principles (Tokheim) Chapter 3 in Introduction to Digital Systems (Palmer and Perlman)
Boolean Algebra and Logic Simplification
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Karnaugh Maps References:
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
CS1Q Computer Systems Lecture 7
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
Karnaugh Maps (K-Maps)
Transistors, Logic Gates and Karnaugh Maps References: Lecture 4 from last.
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
Karnaugh Maps (K maps). What are Karnaugh 1 maps?  Karnaugh maps provide an alternative way of simplifying logic circuits.  Instead of using Boolean.
Karnaugh Maps (K-Maps)
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
THE K-MAP.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce.
CS231 Boolean Algebra1 Circuit analysis summary After finding the circuit inputs and outputs, you can come up with either an expression or a truth table.
CE1110: Digital Logic Design Gate Level Minimization Karnaugh Maps (K-Maps)
CHAPTER 3 Simplification of Boolean Functions
Computer Science 210 Computer Organization
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Computer Organisation
Prof. Sin-Min Lee Department of Computer Science
Dr. Clincy Professor of CS
Circuit analysis summary
Lecture 3 Gunjeet Kaur Dronacharya Group of Institutions
Computer Architecture CST 250
Karnaugh Maps.
Circuits & Boolean Expressions
Digital Logic and Design
Basics Combinational Circuits Sequential Circuits
Karnaugh Maps (K-Maps)
Karnaugh Maps References:
Optimized Implementation of Logic Function
Dr. Clincy Professor of CS
BASIC & COMBINATIONAL LOGIC CIRCUIT
Instructor: Alexander Stoytchev
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
ECE 331 – Digital System Design
ECE 331 – Digital System Design
ECE 331 – Digital System Design
ECB2212-Digital Electronics K-Map
COE 202: Digital Logic Design Combinational Logic Part 3
Dr. Clincy Professor of CS
CS Chapter 3 (3A and ) – Part 3 of 5
Dr. Clincy Professor of CS
Digital Fundamentals Floyd Chapter 4 Tenth Edition
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Chapter 3 Special Section
Some basic electronics and truth tables
Karnaugh Maps (K maps).
Karnaugh maps Last time we saw applications of Boolean logic to circuit design. The basic Boolean operations are AND, OR and NOT. These operations can.
Basic circuit analysis and design
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Circuits & Boolean Expressions
Circuit Simplification and
Computer Architecture
Presentation transcript:

Karnaugh Maps References: Lecture 4 from last semester Chapt. 1 in Computer Systems (Carpinelli)

Expressing truth tables Every truth table can be expressed in terms of the basic Boolean operators AND, OR and NOT operators. The circuits corresponding to those truth tables can be build using AND, OR and NOT gates, which can be made out of transistors. The input in each line of a truth table can be expressed in terms of AND’s and NOT’s

Line by Line Inputs Expression A B A´B´ 1 A´B AB´ AB (Not A) AND (NOT B) A´B´ A´B´ is true for the first line and false for the rest 1 (Not A) AND B A´B A´B is true for the second line and false for the rest A AND (NOT B) AB´ AB´ is true for the third line and false for the rest A AND B AB A´B´ is true for the fourth line and false for the rest This is not yet a truth table. It has no outputs.

Algebra  Gate A’ means NOT A

Algebra  Gates AB means A AND B

Algebra  Gates A+B means A OR B

It’s true; it’s true To express a truth table, take the input lines that correspond to true (high, 1) outputs. Write the expressions for each of those input lines (as shown on the previous slide). Then feed all of those expressions into an OR gate.

A Trivial Example A B C Out 1 A’BC’ A’BC ABC’ ABC

Simplifying a trivial example A´BC´ + A´BC + ABC´ + ABC A´B (C´ + C) + AB (C´ + C) A´B + AB (A´ + A) B B C+C’ means C OR (NOT C) In other words, we don’t care about C

Majority Rules Example B C Majority 1

Row Expressions A B C Row expressions A’B’C’ 1 A’B’C A’BC’ A’BC AB’C’ A’B’C’ 1 A’B’C A’BC’ A’BC AB’C’ AB’C ABC’ ABC

Majority rules without simplification A´BC + AB´C + ABC´ + ABC NOTs OR ANDs

Boolean algebra is different from regular algebra AB + AB = AB (A AND B) OR (A AND B) OR should give one a choice but in this case there’s no choice

Majority Rules Simplification A´BC + AB´C + ABC´ + ABC A´BC+AB´C+ABC´+ABC+ABC+ABC A´BC+ABC+AB´C+ABC+ABC´+ABC (A´+A)BC+A(B´+B)C+AB(C´+C) BC+AC+AB

Majority rules without simplification

Majority Rules Comparison

Simplifying made easy Simplifying Boolean expressions is not always easy So we introduce next a method (a Karnaugh or K map) that is supposed to make simplification more visual The first step is to rearrange the inputs in what is called “gray code” order

Gray code In addition to binary numbers, there is another way of representing numbers using 1’s and 0’s. It is not useful for doing arithmetic, but has other purposes. In gray code the numbers are ordered such that consecutive numbers differ by one bit only.

Gray code (Cont.) 1 Each row different by one bit only

Constructing Gray code 1

Reflect lower bits and 0’s then 1’s in front 1 Add 0’s Reflect lower bits through red line Add 1’s

Reflect lower bits and 0’s then 1’s in front (again) 1 Add 0’s Reflect lower bits through red line Add 1’s

An important property In gray-code order, two consecutive rows of a truth table differ by one bit only. Thus if a truth table is put in gray code order and if two consecutive rows contain a 1, then a simplification of the Boolean expression is possible.

Trivial Example in Gray code B C Out 1

Improving Some combinations that differ only by a single bit are not in consecutive rows. Thus we might miss such a simplification. So we put some of the inputs in as columns.

Two rows that differ by one bit but are not consecutive Out 1

A row-column version A B\C 1 Place the C inputs across the top. All inputs are filled in with light blue. In this version, more inputs differing by one bit only are in adjacent positions. A B\C 1

Karnaugh-map This way of arranging truth tables combined with the rules for simplifying Boolean expressions goes by the name Karnaugh map or K map.

The rules Put the truth table into a form with inputs in gray code order. Then one identifies output “blocks” (as large as possible). A block must be a rectangle containing 1’s and only 1’s. The simplification rules require that the number of 1’s in a block should be a power of 2 (1, 2, 4, 8, …). However, a given output 1 can belong to more than one block.

Wrapping There are still cases in which inputs differing by only one bit are not adjacent (eg. the first and last row). Imagine that the rows wrap around, so for instance, a block can include the top and bottom rows (without intermediate rows) Similarly for columns.

W X Y Z Output 1 Karnaugh Example

Karnaugh Example (Unsimplified Boolean algebra expression) WXY’Z + W’XY’Z + WX’Y’Z’ + W’X’Y’Z’ + WXYZ’ + WXY’Z’ + W’XY’Z’ + W’XYZ’

Example in Karnaugh (identifying block in gray code truth table) Z 1 W X\Y W’X’Y’Z’ W’XY’Z’ W’XY’Z W’XYZ’ WXY’Z’ WXY’Z WXYZ’ WX’Y’Z’

Result Y’Z’ + XY’ + X Z’ A block of size two eliminates one Boolean variable; a block of four eliminates two Boolean variables; and so on. To find the expression for a block, identify the inputs for that block that don’t change, AND them together, that’s your expression for the block. Obtain an expression for each block and OR them together. Every 1 must belong to at least one block (even if it is a block onto itself).