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

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

L2: Combinational Logic Design (Construction and Boolean Algebra)

L2: Combinational Logic Design (Construction and Boolean Algebra)

Possible logic functions of two variables

This form sometimes used in logic circuit, example:

Combinational Logic (mostly review!)

L2: Combinational Logic Design (Construction and Boolean Algebra)

Digital Logic Design. Combinational Logic

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

211: Computer Architecture Summer 2016

Unit 2 Session - 6 Combinational Logic Circuits

MC9211 Computer Organization

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

ELCT201: DIGITAL LOGIC DESIGN

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

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

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

EEE130 Digital Electronics I Lecture #4

Boolean Algebra and Logic Simplification

Chapter 2 : Boolean Algebra and Logic Gates

K-map Definitions. abc

Week-I. Combinational Logic & Circuits

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

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

Theorem/Law/Axioms Over (.) Over (+)

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

Combinational Logic Fundamentals

Chapter 2 Combinational logic

Minimization techniques

Chapter 2 Combinational Logic Circuits

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

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

CHAPTER III BOOLEAN ALGEBRA

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

Chapter 2 Boolean Algebra and Logic Gates

ENG2410 Digital Design Combinational Logic Circuits

Goals for Lecture. Binary Logic and Gates (MK 2.1) Binary Variables. Notation Examples. Logical Operations

Logic Design. Chapter 2: Introduction to Logic Circuits

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

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

Digital Design 2. Logic Gates and Boolean Algebra

Digital Circuit And Logic Design I. Lecture 4

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

CHAPTER III BOOLEAN ALGEBRA

Karnaugh Maps (K-Maps)

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

ELC224C. Karnaugh Maps

Logic Design Combinational Circuits. Digital Computer Design

Chapter 2 Part 7 Combinational Logic Circuits

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

Karnaugh Maps Objectives

Simplifying Logic Circuits with Karnaugh Maps

Chapter 2: Boolean Algebra and Logic Gates

Digital Fundamentals

Chapter 2: Switching Algebra and Logic Circuits

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

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

UNIT 5 KARNAUGH MAPS Spring 2011

Combinational Logic. Review of Combinational Logic 1

Gate-Level Minimization

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

Chapter 2. Boolean Algebra and Logic Gates

Number System conversions

14:332:231 DIGITAL LOGIC DESIGN

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

Combinational Logic Circuits Part II -Theoretical Foundations

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

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

Boolean Algebra and Logic Gates

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

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

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

Chapter 2 Combinational Logic Circuits

Boolean Algebra & Logic Gates. By : Ali Mustafa

Chapter 2. Introduction. Chapter 2 :: Topics. Circuits. Nodes. Circuit elements. Introduction

Boolean Algebra. Boolean Variables, Functions. NOT operation. AND operation. AND operation (cont). OR operation

Chapter 7 Logic Circuits

COSC3330 Computer Architecture Lecture 2. Combinational Logic

EECS Variable Logic Functions

Basic Gate Repertoire

Chap 2. Combinational Logic Circuits

Part 5: Digital Circuits

Lecture 2 Review on Digital Logic (Part 1)

Fundamentals of Computer Systems

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Midterm1 Review. Jan 24 Armita

Prove that if not fat and not triangle necessarily means not green then green must be fat or triangle (or both).

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

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Digital Circuit And Logic Design I. Lecture 3

Chapter 2 Boolean Algebra and Logic Gates

DIGITAL ELECTRONICS & it0203 Semester 3

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Chapter-2 BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

ECE/Comp Sci 352 Digital System Fundamentals Quiz # 1 Solutions

Transcription:

بهينه سازي با نقشة کارنو Karnaugh Map

Karnaugh Map Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable K-map 2 3 2 3 6 7 4 5 D 3 2 4 5 7 6 2 3 5 4 8 9 4-variable K-map D 2

Karnaugh Map One map cell corresponds to a row in the truth table. lso, one map cell corresponds to a minterm (or a maxterm) in the boolean expression. Multiple-cell areas of the map correspond to standard terms. 2 3 2 3 6 7 4 5 D 3 2 4 5 7 6 2 3 5 4 8 9 D 3

Karnaugh Map f (,,) = m + m 2 + m 4 + m 6 = + + + 2 6 4 3 7 5 f m m m2 m3 m4 m5 m6 m7 4

Karnaugh Map Numbering Scheme:,,, Gray ode - only a single bit changes from code word to next code word. 2 3 D 3 4 5 7 2 3 5 8 9 D 2 6 4 2 6 4 3 7 5 5

Two-Variable Map (cont.) ny two adjacent cells in the map differ by ONLY one variable, which appears complemented in one cell and uncomplemented in the other. Example: m (= ) is adjacent to m (= ) and m 2 (= ) but NOT m 3 (=) 2 3 6

Karnaugh Map djacencies in the K-Map Wrap from first to last column Top row to bottom row 7

2-Variable Map -- Example f(x,x 2 ) = x x 2 + x x 2 + x x 2 = m + m + m 2 s placed in K-map for specified minterms m, m, m 2 Grouping (ORing) of s allows simplification What (simpler) function is represented by each dashed rectangle? m + m = x x 2 + x x 2 = x (x 2 + x 2 ) = x m + m 2 = x x 2 + x x 2 = x 2 (x + x ) = x 2 Note m covered twice x x 2 2 3 8

Minimization as SOP using K-map Enter s in the K-map for each product term in the function Group adjacent K-map cells containing s to obtain a product with fewer variables. Groups must be in power of 2 (2, 4, 8, ) Handle boundary wrap for K-maps of 3 or more variables. nswer may not be unique 9

Minimization as SOP asserted, unchanged varies F =? complemented, unchanged varies G =? in out =? F(,,) =?

Minimization as SOP asserted, unchanged varies F = complemented, unchanged varies G = ' in out = + cin + in F(,,) =

More Examples F(,,) = m(,4,5,7) F = F' : simply replace 's with 's and vice versa F'(,,) = m(,2,3,6) F' = 2

More Examples Why not group m4 and m5? F(,,) = m(,4,5,7) F = ' ' + F' simply replace 's with 's and vice versa F'(,,) = m(,2,3,6) F' = ' + ' ompare with the method of using DeMorgan's Theorem and oolean lgebra to reduce the complement! 3

Simplification Enter minterms of the oolean function into the map, then group terms Example: f(a,b,c) = bc + abc + ab Result: f(a,b,c) = bc + a c ab c ab 4

4-Variable Map D D F(,,,D) = m(,2,3,5,6,7,8,,,4,5) F = D m m 4 m 2 m 8 m m 5 m 3 m 9 m 3 m 7 m 5 m m 2 m 6 m 4 m 5

Four-variable Map Simplification One square represents a minterm of 4 literals. rectangle of 2 adjacent squares represents a product term of 3 literals. rectangle of 4 squares represents a product term of 2 literals. rectangle of 8 squares represents a product term of literal. rectangle of 6 squares produces a function that is equal to logic. 6

4-Variable Map D F(,,,D) = m(,2,3,5,6,7,8,,,4,5) F = + ' D + ' D' D Find the smallest number of the largest possible subcubes that cover the ON-set 7

Simplify for POS D K-map Method: ircling Zeros to get product of sums form F = ( + + D) ( + + D ) ( + + D ) D Replace F by F, s become s and vice versa F = D + D + D (F ) = ( D + D + D) F = ( + + D) ( + + D ) ( + + D ) 8

Don t ares Don't ares can be treated as 's or 's if it is advantageous to do so D X F(,,,D) = m(,3,5,7,9) + d(6,2,3) X X In Product of Sums form Same answer as above, but fewer literals D F = 'D + ' ' D w/o don't cares F = ' D + ' D w/ don't cares : F = D (' + ') D X X D X 9

2 Example: omparator Design Example: Two it omparator lock Diagram and Truth Table 4-Variable K-map for each of the 3 output functions F F 2 F 3 D F = D F 2 < D F 3 > D D N N 2

omparator K-Maps D D D D D D K-map for F K-map for F 2 K-map for F 3 F = F2 = F3 = ' ' ' D' + ' ' D + D + ' D' ' ' D + ' D + ' ' D' + ' + D' = ( xnor ) ( xnor D) much simpler, but not in sum of products form s on K-map diagonals make XOR or XNOR 2

22 Example: Two it dder lock Diagram and Truth Table 4-variable K-map for each of the 3 output functions + N 3 X Y Z D D N N 2 X Y Z out

dder K-Maps D D D D D D K-map for X K-map for Y K-map for Z X = + D + D 's on diagonal suggest XOR! Z = D' + ' D = xor D Y = ' ' + ' ' + ' ' D + ' D' + ' D' + D = ' ( xor ) + ' ( xor D) + ( xnor D) = ' ( xor ) + ( xor xor D) gate count reduced if XOR available 23

\ \ \ Implementations of Y \ D Two alternative implementations of Y with and without XOR D Y X Note: XOR typically requires 4 NND gates to implement! X XOR Y Y Y 2 24

xy + yx = xy + yx + xx + yy x(y +x ) + y(x +y ) x.(x.y) + y. (x.y) ((x.(x.y) ). (y. (x.y) ) ) XOR X Y X XOR Y تبديل مدارها به فقط :Nand بعد ا 25

26 D W X X X X X X X X X X X X X Y X X X X X X Z X X X X X X Example: D Incrementer

Example: D Incrementer D X D X W X X X X X D X X X X X X D D D X X Y X X X X X D Z X X X X X D W = D + D' X = ' + D' + ' D Y = ' ' D + D' Z = D' 27

Implicant: Definition of Terms single element of the ON-set or any group of elements that can be combined together in a K-map (= adjacency plane) Prime Implicant (PI): implicant (a circled set of -cells) satisfying the combining rule, such that if we try to make it larger (covering twice as many cells), it covers one or more s. Distinguished -cell: an input combination that is covered by only one PI. Essential Prime Implicant (EPI): a PI that covers one or more distinguished -cells. 28

Implicant, PI and EPI D 6 Prime Implicants: ' ' D, ',, ' ' D,, ' D D Essential Minimum cover = First: cover EPIs Then: minimum number of PIs = ' + + ' ' D 29

Implicant, PI and EPI D D 5 Prime Implicants: D, ', D, ', ' ' D essential Minimum cover = First: cover EPIs Then: minimum number of PIs = + D + ' + ' ' D 3

More Examples D Prime Implicants: D, D,, ' D essential = D + + ' 3

Example Example: f(,,,d) = m(4,5,6,8,9,,3) + d(,7,5) D D D X X X X X D X X D X X D Initial K-map Primes around ' ' D' Primes around ' D 32

Example: ontinued D D X X X X D X X D Primes around ' ' D' Essential Primes with Min over (each element covered once) 33

5-Variable K-Map 34

5-Variable K-Map DE = 4 2 8 5 3 9 3 7 5 2 6 4 DE = 6 2 28 24 7 2 29 25 9 23 3 27 8 22 3 26 35

= DE 5-Variable K-Map = DE DE = = DE f(,,,d,e) = m(2,5,7,8,, 3,5,7,9,2,23,24,29 3) = E + ' E + ' D' E' + ' ' D E' 36

6-Variable K-Map 37

7-Variable K-Map 38

8-Variable K-Map 39

ترکيب هاي XOR در جدول کارنو خانه هاي قطري نشان مي دهند يکي از فرم هاي XOR/XNOR که با دقت بيشتر معلوم مي شود کدام است. است b a b a ab + a b = a XOR b a b + ab = a XNOR b 4

ترکيب هاي XOR در جدول کارنو c ab c ab a b c + a bc + abc + ab c = a (boc) + + a(boc) + = ao(boc). + a b c + a bc + abc + ab c = a (boc) + + a(boc) + = ao(boc) + + 4

ترکيب هاي XOR در جدول کارنو با بررسي بيشتر داخل o معلوم مي شود. :a.(boc) c ab c ab a (b c + bc) = a (boc) + b(aoc) b(a c + ) = b (aoc). 42

ab cd ترکيب هاي XOR در جدول کارنو a c d c (aobod) ab cd a b bd(aoc) c d b 43

ترکيب هاي XOR در جدول کارنو c ab bc + b c =(boc) + c ab b c + bc 44

ترکيب هاي XOR در جدول کارنو c ab a c + ac c ab ac +a c 45

ترکيب هاي XOR در جدول کارنو قوت روش: به خصوص وقتي don t care داريم. 46

Implementing by Nands only Nand: Universal gate can replace gates by equivalent Nand circuit. ut Large circuit (many gates) 47

New Symbols for ND/OR DeMorgan s Law: (a + b) = a b (a b) = a + b a + b = (a b ) (a b) = (a + b ) = = = = 48

New Symbols for NOT (a. a) = a _ (a + a) = a 49

NND-Only Implementation Find Sum-of-Product form. Inventers can be added Equivalent NND-only 5

nother Example 5

NOR-Only Implementation Find Product-of-Sums form. Inventers can be added Equivalent NOR-only 52

NND-Only Implementation NND-only: nother method: Group s in K-Map Find F in SOP form dd an inverter at the end. 53

NND-Only Implementation Multi-Level ircuits onvert ND/OR gates to proper NND gates ND ND-NOT symbol OR NOT-OR symbol ubbles must cancel each other; otherwise, insert a NND inverter. Take care of appropriate input literals. 54

NND-Only Implementation Example: 55

NND-Only Implementation nother Example: 56

NND-Only Implementation e careful about branches: Gates with multi-fanouts D (a) X F X D X F D X F (b) (c) 57

NOR-Only Implementation NOR-Only: Use Duality for the last several slides. 58

nalysis of NND ircuits The functionality of a NND-only circuit is not clear. Must be converted to ND-OR circuit. 59

Example nalysis of NND ircuits 6

nalysis of NND/NOR ircuits 6

nalysis of NND/NOR ircuits 62

Variable-Entered Maps

Variable-Entered Maps Using a 3-variable K-Map for a 4-variable function Extract some variables out of the function: F(,,, D) ' ' ' ' ' D ' D dont care( ) F(,,, D) m m2. D m3 m7. D dont care( m5) Reminder: Shannon Theorem: F(x,x2,,xn) = x.f(,x2,,xn) + x.f(,x2,,xn) 64

Variable-Entered Maps To enter the variables in the K-map: Example: G(,,, D, E, F) m m2 m3 Em5 Em7 Fm9 m m5 ( don' t care terms) 65

Variable-Entered Maps To group map entries: an consider F as: F S P. S P2. S2... P i s are map-entered variables S : minimum sum obtained by P =P 2 = = S : minimum sum obtained by P =, P j = (j=/ ) and replacing all s on the map with don t cares (X) S 2 : minimum sum obtained by P 2 =, P j = (j=/ 2) and replacing all s on the map with don t cares (X) S s :. 66

6-variable function Variable-Entered Maps Example: G(,,, D, E, F) m m2 m3 Em5 Em7 Fm9 m m5 ( don' t care terms : m m m3) 67

68 Variable-Entered Maps oth and in the map-entered variables: F = ' ' + + ' + = ' (') + () + () F F

Variable-Entered Maps F = ' (') + () + X F = + 69