Spiral 1 / Unit 5. Karnaugh Maps

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

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

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

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

Unit 2 Session - 6 Combinational Logic Circuits

Simplifying Logic Circuits with Karnaugh Maps

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

Spiral 1 / Unit 3

Contents. Chapter 3 Combinational Circuits Page 1 of 36

UNIT 5 KARNAUGH MAPS Spring 2011

ELC224C. Karnaugh Maps

CHAPTER III BOOLEAN ALGEBRA

Digital Logic Design. Combinational Logic

CHAPTER III BOOLEAN ALGEBRA

211: Computer Architecture Summer 2016

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

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

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

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

This form sometimes used in logic circuit, example:

Standard Expression Forms

Karnaugh Maps Objectives

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

Gate-Level Minimization

Combinational Logic Fundamentals

Midterm1 Review. Jan 24 Armita

Introduction to Karnaugh Maps

Karnaugh Map & Boolean Expression Simplification

Logic Design Combinational Circuits. Digital Computer Design

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

Chapter 2 : Boolean Algebra and Logic Gates

Chapter 4 Optimized Implementation of Logic Functions

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

ENG2410 Digital Design Combinational Logic Circuits

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

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

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

EE 209 Spiral 1 Exam Solutions Name:

MC9211 Computer Organization

Chapter 7 Logic Circuits

Lecture 7: Karnaugh Map, Don t Cares

Review for Test 1 : Ch1 5

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

Chapter 2 Combinational Logic Circuits

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

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

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

Optimizations and Tradeoffs. Combinational Logic Optimization

Combinatorial Logic Design Principles

Karnaugh Maps (K-Maps)

Minimization techniques

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

Week-I. Combinational Logic & Circuits

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

CS/EE 181a 2010/11 Lecture 4

14:332:231 DIGITAL LOGIC DESIGN

Outcomes. Spiral 1 / Unit 3. The Problem SYNTHESIZING LOGIC FUNCTIONS

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

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

Chapter 2 Boolean Algebra and Logic Gates

Fundamentals of Computer Systems

CHAPTER 5 KARNAUGH MAPS

Logical Design of Digital Systems

Lecture 2 Review on Digital Logic (Part 1)

Chap 2. Combinational Logic Circuits

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Digital Circuit And Logic Design I. Lecture 4

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

Logic Design I (17.341) Fall Lecture Outline

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

CHAPTER1: Digital Logic Circuits Combination Circuits

Fundamentals of Computer Systems

CHAPTER 7. Solutions for Exercises

Systems I: Computer Organization and Architecture

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

CHAPTER 12 Boolean Algebra

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

WEEK 3.1 MORE ON KARNAUGH MAPS


CMPT-150-e1: Introduction to Computer Design Final Exam

Number System conversions

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

Digital Circuit And Logic Design I. Lecture 3

Written exam for IE1204/5 Digital Design with solutions Thursday 29/

CS/EE 181a 2008/09 Lecture 4

1. Name the person who developed Boolean algebra

Boolean Algebra and Logic Simplification

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

Signals and Systems Digital Logic System

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Fundamentals of Computer Systems

Boolean Algebra, Gates and Circuits

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

ECE 2300 Digital Logic & Computer Organization

Chapter 2 Combinational Logic Circuits

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

The Design Procedure. Output Equation Determination - Derive output equations from the state table

3. PRINCIPLES OF COMBINATIONAL LOGIC

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

MODULAR CIRCUITS CHAPTER 7

Transcription:

-. Spiral / Unit Karnaugh Maps

-. Outcomes I know the difference between combinational and sequential logic and can name examples of each. I understand latency, throughput, and at least technique to improve throughput I can identify when I need state vs. a purely combinational function I can convert a simple word problem to a logic function (TT or canonical form) or state diagram I can use Karnaugh maps to synthesize combinational functions with several outputs I understand how a register with an enable functions & is built I can design a working state machine given a state diagram I can implement small logic functions with complex CMOS gates

-. A new way to synthesize your logic functions KARNAUGH MAPS

-. Logic Function Synthesis Given a function description as a T.T. or canonical form, how can we arrive at a circuit implementation or equation (i.e. perform logic synthesis)? First method Minterms / maxterms Can simplify to find minimal -level implementation Use "off-the-shelf" decoder + gate per output New, second method Karnaugh Maps Minimal -level implementation (though not necessarily minimal -, -, level implementation)

-. Gray Code Different than normal binary ordering Reflective code When you add the (n+) th bit, reflect all the previous n-bit combinations Consecutive code words differ by only -bit differ by only -bit -bit Gray code when you move to the next bit, reflect the previous combinations

-. Gray Code Different than normal binary ordering Reflective code When you add the (n+) th bit, reflect all the previous n-bit combinations Consecutive code words differ by only -bit differ by only -bit when you move to the next bit, reflect the previous combinations differ by only -bit -bit Gray code differ by only -bit -bit Gray code

-. Karnaugh Maps If used correctly, will always yield a minimal, - level implementation There may be a more minimal -level, -level, - level implementation but K-maps produce the minimal two-level (SOP or POS) implementation Represent the truth table graphically as a series of adjacent squares that allows a human to see where variables will cancel

-. Karnaugh Map Construction Every square represents input combination Must label axes in Gray code order Fill in squares with given function values F=Σ XYZ (,,,) G=Σ YZ (,,,,,,,,,,) XY Z YZ Variable Karnaugh Map Variable Karnaugh Map

-. Karnaugh Maps W X Y Z F YZ

-. Karnaugh Maps Squares with a '' represent minterms Squares with a '' represent maxterms YZ Maxterm: w + x + y + z Maxterm: w + x + y + z Minterm: w x y z Minterm: w x y z

-. Karnaugh Maps Groups of adjacent s will always simplify to smaller product term than just individual minterms XY Z F=Σ XYZ (,,,,) Variable Karnaugh Map

-. Karnaugh Maps Groups of adjacent s will always simplify to smaller product term than just individual minterms F=Σ XYZ (,,,,) XY Z Variable Karnaugh Map = m + m + m + m = x y z + x yz + xyz + xy z = z (x y + x y + xy + xy ) = z (x (y +y) + x(y+y )) = z (x +x) = z = m + m = xy z + xy z = xy (z +z) = xy

-. Karnaugh Maps Adjacent squares differ by -variable This will allow us to use T = AB + AB = A or T = (A+B )(A+B) = A Variable Karnaugh Map Variable Karnaugh Map Difference in X: & XY x yz + xyz Z = yz Difference in Y: & x yz + x y z = x z = = = = Difference in Z: & x yz + x yz = x y Adjacent squares differ by -bit YZ = = = = = Adjacent squares differ by -bit

-. Karnaugh Maps adjacent s (or s) differ by only one variable adjacent s (or s) differ by two variables,, adjacent s (or s) differ by,, variables By grouping adjacent squares with s (or s) in them, we can come up with a simplified expression using T (or T for s) w x y z + w x y z + w x y z + w x y z = w z w z are constant while all combos of x and y are present (x y, x y, xy, xy) YZ (w +x +y+z) (w +x +y+z ) = (w +x +y) w x y z + w x y z = w y z

-. K-Map Grouping Rules Cover the 's [=on-set] or 's [=off-set] with as few groups as possible, but make those groups as large as possible Make them as large as possible even if it means "covering" a (or ) that's already a member of another group Make groups of,,,,... and they must be rectangular or square in shape. Wraparounds are legal

-. K-Map Grouping Rules XY Z YZ XY Z

-. Karnaugh Maps YZ Cover the remaining with the largest group possible even if it reuses already covered s

-. Karnaugh Maps Groups can wrap around from: Right to left Top to bottom Corners YZ YZ F = X Z + Z F = X Z

-. Group This YZ

-. K-Map Translation Rules When translating a group of s, find the variable values that are constant for each square in the group and translate only those variables values to a product term Grouping s yields SOP When translating a group of s, again find the variable values that are constant for each square in the group and translate only those variable values to a sum term Grouping s yields POS

-. Karnaugh Maps (SOP) W X Y Z F YZ F =

-. Karnaugh Maps (SOP) W X Y Z F Y YZ F = Y

-. Karnaugh Maps (SOP) W X Y Z F YZ Z W F = Y + W Z +

-. Karnaugh Maps (SOP) W X Y Z F YZ Z X F = Y + W Z + X Z X

-. Karnaugh Maps (POS) W X Y Z F YZ F =

-. Karnaugh Maps (POS) W X Y Z F Y,Z YZ F = (Y+Z)

-. Karnaugh Maps (POS) W X Y Z F Y YZ F = (Y+Z)(W +X +Y)

-. Karnaugh Maps Groups can wrap around from: Right to left Top to bottom Corners Z YZ X X Z YZ X X Z Z Z F = X Z + Z F = X Z

-. Exercises YZ YZ F SOP = F POS = P= XYZ (,,,) P=

-. No Redundant Groups YZ

-. Multiple Minimal Expressions For some functions, multiple minimal groupings exist which will lead to alternate minimal expressions Pick one DD DD Best way to cover this??

-. Multiple Minimal Expressions For some functions, multiple minimal expressions (multiple minimal groups) exist Pick one YZ Pick either one

-. Terminology Implicant: A product term (grouping of s) that covers a subset of cases where F= the product term is said to imply F because if the product term evaluates to then F= Prime Implicant: The largest grouping of s (smallest product term) that can be made Essential Prime Implicant: A prime implicant (product term) that is needed to cover all the s of F

-. Implicant Examples W X Y Z F YZ An implicant Not PRIME because not as large as possible

-. Implicant Examples W X Y Z F YZ An implicant Not PRIME because not as large as possible An implicant

-. Implicant Examples W X Y Z F YZ An implicant Not PRIME because not as large as possible An implicant An essential prime implicant An essential prime implicant (largest grouping possible, that must be included to cover all s)

-. Implicant Examples W X Y Z F An essential prime implicant YZ An implicant Not PRIME because not as large as possible An implicant An essential prime implicant An essential prime implicant (largest grouping possible, that must be included to cover all s)

-. Implicant Examples W X Y Z F An essential prime implicant A prime implicant, but not an ESSENTIAL implicant because it is not needed to cover all s in the function YZ An implicant Not PRIME because not as large as possible An implicant An essential prime implicant An essential prime implicant (largest grouping possible, that must be included to cover all s)

-. Implicant Examples W X Y Z F An implicant, but not a PRIME implicant because it is not as large as possible (should expand to combo s and ) YZ An essential prime implicant (largest grouping possible, that must be included to cover all s) An essential prime implicant

-. K-Map Grouping Rules Make groups (implicants) of,,,,... and they must be rectangular or square in shape. Include the minimum number of essential prime implicants Use only essential prime implicants (i.e. as few groups as possible to cover all s) Ensure that you are using prime implicants (i.e. Always make groups as large as possible reusing squares if necessary) Wraparounds are legal

-. -Variable K-Map If we have a -variable function we need a -square KMap. Will an x matrix work? Recall K-maps work because adjacent squares differ by -bit How many adjacencies should we have for a given square?!! But drawn in dimensions we can t have adjacencies. V YZ

-. -Variable Karnaugh Maps To represent the adjacencies of a -variable function [e.g. f(v,w,x,y,z)], imagine two x K-Maps stacked on top of each other Adjacency across the two maps YZ These are adjacent YZ Traditional adjacencies still apply (Note: v is constant for that group and should be included) => v xy Adjacencies across the two maps apply (Now v is not constant) => w xy V= V= F = v xy + w xy

-. -Variable Karnaugh Maps adjacencies for -variables (Stack of four x maps) YZ Group of Not adjacent YZ U,V=, U,V=, YZ YZ Group of U,V=, U,V=,

-. Don t-cares Sometimes there are certain input combinations that are illegal (i.e. in BCD, can never occur) The outputs for the illegal inputs are don t-cares The output can either be or since the inputs can never occur Don t-cares can be included in groups of or groups of when grouping in K-Maps Use them to make as big of groups as possible

-. Combining Functions Given intermediate functions F and F, how could you use AND, OR, NOT to make G Notice certain F,F combinations never occur in G(x,y,z) what should we make their output in the T.T. X Y Z F F G X Y Z F F G F F G

-. Don t Care Example D D D D GT d d d d d d DD DD DD d d d d d d DD d d d d d d GT SOP = GT POS =

-. Don t Care Example D D D D GT d d d d d d DD DD DD d d d d d d DD d d d d d d GT SOP = GT POS =

-. Don t Cares W X Y Z F d d d d d d YZ d d d d d d F = Y Z + Y Reuse d s to make as large a group as possible to cover,, & Use these d s to make a group of

-. Don t Cares W X Y Z F d d d d d d YZ d d d d d d F = Y+Z You can use d s when grouping s and converting to POS

-. Designing Circuits w/ K-Maps Given a description Block Diagram Truth Table K-Map for each output bit (each output bit is a separate function of the inputs) -bit unsigned decrementer (Z = X-) If X[:] = then Z[:] =, etc. X[:] -bit Unsigned Decrementer Z[:]

-. -bit Number Decrementer X X X Z Z Z X X X X X X X X X Z = X X + X X + X X X Z = X X + X X Z = X

-. Squaring Circuit Design a combinational circuit that accepts a -bit number and generates an output binary number equal to the square of the input number. (B = A ) Using bits we can represent the numbers from to. The possible squared values range from to. Thus to represent the possible outputs we need how many bits?

-. -bit Squaring Circuit Inputs Outputs AA A A A A B B B B B B B=A A B = AA A B = AA A B =

-. -bit Squaring Circuit A A A B B B B B B

-. -bit Squaring Circuit Inputs Outputs A A A A B B B B B B B=A AA A B = AA AA A B = AA + AA AA A B = A