Specifying logic functions

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

DKT 122/3 DIGITAL SYSTEM 1

Combinational Logic Circuits

Simplification of two-level combinational logic

Module -7. Karnaugh Maps

CMPE223/CMSE222 Digital Logic

ECE380 Digital Logic

University of Technology

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

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

Simplification of Boolean Functions

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

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

Gate Level Minimization Map Method

A B AB CD Objectives:

Experiment 3: Logic Simplification

Literal Cost F = BD + A B C + A C D F = BD + A B C + A BD + AB C F = (A + B)(A + D)(B + C + D )( B + C + D) L = 10

IT 201 Digital System Design Module II Notes

Chapter 3. Gate-Level Minimization. Outlines

ELCT201: DIGITAL LOGIC DESIGN

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Combinational Logic Circuits Part III -Theoretical Foundations

ELCT201: DIGITAL LOGIC DESIGN

Chapter 2. Boolean Expressions:

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

Chapter 2 Combinational

2.6 BOOLEAN FUNCTIONS

CS8803: Advanced Digital Design for Embedded Hardware

Combinational Circuits Digital Logic (Materials taken primarily from:

Switching Circuits & Logic Design

Combinational Logic Circuits

4 KARNAUGH MAP MINIMIZATION

1. Mark the correct statement(s)

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

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

Introduction. The Quine-McCluskey Method Handout 5 January 24, CSEE E6861y Prof. Steven Nowick

Chapter 2 Combinational Logic Circuits

Combinational Logic & Circuits

SWITCHING THEORY AND LOGIC CIRCUITS

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

Gate Level Minimization

Ch. 5 : Boolean Algebra &

Digital Logic Lecture 7 Gate Level Minimization

DIGITAL CIRCUIT LOGIC UNIT 5: KARNAUGH MAPS (K-MAPS)

Unit-IV Boolean Algebra

Chapter 2 Combinational Logic Circuits

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

Chapter 3 Simplification of Boolean functions

SEE1223: Digital Electronics

Digital Logic Design (CEN-120) (3+1)

CprE 281: Digital Logic

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

Gate-Level Minimization

To write Boolean functions in their standard Min and Max terms format. To simplify Boolean expressions using Karnaugh Map.

ENGIN 112 Intro to Electrical and Computer Engineering

Final Examination (Open Katz, asynchronous & test notes only, Calculators OK, 3 hours)

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

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Switching Theory And Logic Design UNIT-II GATE LEVEL MINIMIZATION

Gate-Level Minimization


Chapter 2: Combinational Systems

Summary. Boolean Addition

Synthesis 1. 1 Figures in this chapter taken from S. H. Gerez, Algorithms for VLSI Design Automation, Wiley, Typeset by FoilTEX 1

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.

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

UNIT II. Circuit minimization

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

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

Simplification of Boolean Functions

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

X Y Z F=X+Y+Z

Gate-Level Minimization

Lecture 5. Chapter 2: Sections 4-7

Chapter 6. Logic Design Optimization Chapter 6

Boolean Analysis of Logic Circuits

1. Fill in the entries in the truth table below to specify the logic function described by the expression, AB AC A B C Z

EEE130 Digital Electronics I Lecture #4_1

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Larger K-maps. So far we have only discussed 2 and 3-variable K-maps. We can now create a 4-variable map in the

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

Experiment 4 Boolean Functions Implementation

數位系統 Digital Systems 朝陽科技大學資工系. Speaker: Fuw-Yi Yang 楊伏夷. 伏夷非征番, 道德經察政章 (Chapter 58) 伏者潛藏也道紀章 (Chapter 14) 道無形象, 視之不可見者曰夷

Computer Science. Unit-4: Introduction to Boolean Algebra

Introduction to Computer Architecture

Gate-Level Minimization. section instructor: Ufuk Çelikcan

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

R.M.D. ENGINEERING COLLEGE R.S.M. Nagar, Kavaraipettai

Digital logic fundamentals. Question Bank. Unit I

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

2.1 Binary Logic and Gates

QUESTION BANK FOR TEST

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Code No: 07A3EC03 Set No. 1


Chapter 3 working with combinational logic

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

(Refer Slide Time 6:48)

Transcription:

CSE4: Components and Design Techniques for Digital Systems Specifying logic functions Instructor: Mohsen Imani Slides from: Prof.Tajana Simunic and Dr.Pietro Mercati

We have seen various concepts: Last lecture - Logic function (as a mathematical formula): some,,, with Boolean variables - Truth table: a table that reports all possible combination of inputs and the corresponding output - Logic circuit (made of gates): allows you to give a graphical representation of the circuit implementing a logic function - They all are possible ways of representing the same thing - Today: we will use these concepts and see how to jump between them - We are going to need more definitions and more formalism! 2

Sum-of-products Canonical Form Also known as disjunctive normal form Minterm expansion: F = F = A B C + A BC + AB C + ABC + ABC A B C F F F = A B C + A BC + AB C 3

Sum-of-products canonical form (cont d) Product minterm ANDed product of literals input combination for which output is each variable appears exactly once, true or inverted (but not both) You can write a canonical form in multiple ways A B C minterms A B C m A B C m A BC m2 A BC m3 AB C m4 AB C m5 ABC m6 ABC m7 short-hand notation for minterms of 3 variables F F in canonical form: F(A, B, C) = m(,3,5,6,7) = m + m3 + m5 + m6 + m7 = A B C + A BC + AB C + ABC + ABC canonical form minimal form F(A, B, C) = A B C + A BC + AB C + ABC + ABC = (A B + A B + AB + AB)C + ABC = ((A + A)(B + B))C + ABC = C + ABC = ABC + C = AB + C 4

Product-of-sums canonical form (cont d) Sum term (or maxterm) ORed sum of literals input combination for which output is false each variable appears exactly once, true or inverted (but not both) A B C maxterms A+B+C M A+B+C M A+B +C M2 A+B +C M3 A +B+C M4 A +B+C M5 A +B +C M6 A +B +C M7 F F in canonical form: F(A, B, C) = M(,2,4) = M M2 M4 = (A + B + C) (A + B + C) (A + B + C) canonical form minimal form F(A, B, C) = (A + B + C) (A + B + C) (A + B + C) = (A + B + C) (A + B + C) (A + B + C) (A + B + C) = (A + C) (B + C) short-hand notation for maxterms of 3 variables 5

Product of Sum Canonical Form Carry(A,B)= Maxterm A B Carry Sum 6

When would you use the SOP instead of the POS to express the switching function? A. When the output of the function is TRUE for most input combinations B. When the output of the function is FALSE for most input combinations C. We always prefer the SOP form because it s more compact D. None of the above 7

Mapping between canonical forms Minterm to maxterm conversion use maxterms whose indices do not appear in minterm expansion e.g., F(A,B,C) = m(,3,5,6,7) = M(,2,4) Maxterm to minterm conversion use minterms whose indices do not appear in maxterm expansion e.g., F(A,B,C) = M(,2,4) = m(,3,5,6,7) Minterm expansion of F to minterm expansion of F use minterms whose indices do not appear e.g., F(A,B,C) = m(,3,5,6,7) F (A,B,C) = m(,2,4) Maxterm expansion of F to maxterm expansion of F use maxterms whose indices do not appear e.g., F(A,B,C) = M(,2,4) F (A,B,C) = M(,3,5,6,7) 8

The SOP and POS forms don t usually give the optimal circuit or the simplest Boolean expression of the switching function To optimize the circuit, we need to simplify using:. Boolean algebra axioms and theorems 2. Karnaugh Maps (K-Maps) 9

CSE4: Components and Design Techniques for Digital Systems Logic Simplification with K-maps Slides from Prof.Tajana Simunic Rosing Sources:

Two-level minimization Let s look at a SOP canonical form: A B C F SOP F = A B C +A B C+A BC +A BC+AB C +ABC To easily get there, we need a tool called k-map, which allows to easily apply the minimization algorithm Equivalent minimum 2-level form: F = A +C

Key to simplification: the uniting theorem Uniting theorem: X (Y + Y) = X Essence of simplification of two-level logic find two element subsets of the ON-set where only one variable changes its value this single varying variable can be eliminated and a single product term used to represent both elements A B F F = A B +A B = A (B+B ) = A A has the same value in both on-set rows A remains B has a different value in the two rows B is eliminated 2

Mapping truth tables onto Boolean cubes Uniting theorem combines two faces" of a cube into a larger face" Example: A B F B F two faces of size (nodes) combine into a face of size (line) A A varies within face, B does not this face represents the literal B' ON-set = solid nodes OFF-set = empty nodes DC-set = 'd nodes 3

Flat map of Boolean cube wrap around at edges Karnaugh maps hard to draw and visualize for more than 4 variables Alternative to truth-tables to help visualize adjacencies guide to applying the uniting theorem on-set elements with only one variable changing value are adjacent unlike the linear truth-table ID A B f(a,b) f(,) f(,) 2 f(,) 3 f(,) A= A= B= A B AB B= A B AB A B F B A 2 3 4

2-Variable K-Map Example ID A B f(a,b) 2 3 B = B = A = A = 2 3 5

2-Variable K-Map Example Cont. ID A B f(a,b) B = A = A = 2 AB 2 3 B = 3 A B AB f(a,b) = A + B 6

Question What s the simplified function of the following K-map? A. A B. A B C. AB D. B E. A A = A = B = 2 B = 3 7

Boolean cubes Visual technique for applying the uniting theorem n input variables = n-dimensional "cube RULE: adjacent points should differ by only bit -cube X Y X 2-cube 3-cube Y Z X Y Z X W 4-cube 8

2-Variable K-Map Id a b c f (a,b,c) 2 3 4 5 6 7 (a,b) c = c = (,) (,) (,) (,) 2 4 6 3 5 7 Wrong K-map Table!!! Neighbor cells don t have bit similarity 9

Truth Table Reduction in three variable K-maps Id a b c f (a,b,c) 2 3 4 5 6 7 (a,b) c = c = (,) (,) (,) (,) 2 6 4 3 7 5 2

Karnaugh Maps with 3 Variables Numbering scheme is based on Gray code e.g.,,,, only a single bit changes in code for adjacent map cells AB C 2

Karnaugh Maps with 3 Variables Numbering scheme is based on Gray code e.g.,,,, only a single bit changes in code for adjacent map cells ABC F AB C 22

Three Variable K-map Is this K-map correct? A. Yes B. No (a,b) c = c = (,) (,) (,) (,) 2 4 6 3 5 7

Truth Table Reduction in three variable K-maps Id a b c f (a,b,c) 2 3 4 5 6 7 (a,b) c = c = (,) (,) (,) (,) 2 6 4 3 7 5 24

(a,b) c = (,) (,) (,) (,) 2 6 4 c = 3 7 5 (a,b) c = (,) (,) (,) (,) 2 6 4 c = 3 7 5 25

Minimum number of SOP terms to cover the following function? A. B. 2 C. 3 D. 4 (a,b) (,) (,) (,) (,) E. 5 2 6 4 c = c = 3 7 5 26

4-input K-Mmap: Alternative Representation AB CD A C B D Place a bold bar where the value of a variable is and label it. Outside of the bar, the value of the variable is 27

Examples AB CD AB CD A. B C + A B B. B C D + A B + B C D C. A B CD +B C D. AB +A B + A B D 28

Examples AB CD AB CD 29

CSE4: Components and Design Techniques for Digital Systems Don t cares Tajana Simunic Rosing 3

Incompletely Specified Functions Situations where the output of a function can be either or for a particular combination of inputs This is specified by a don t care in the truth table Id a b f (a, b) 2 3 X: don t care This happens when ) The input does not occur. E.g. Decimal numbers 9 use 4 bits, so (,,,) does not occur. 2) The input may happen but we don t care about the output. E.g. The output driving a seven segment display we don t care about illegal inputs (greater than 9) 3

Don t care! Does it help to simplify? Do we get a smaller circuit implementation if we assume f(,)= instead of f(,)=? A. Yes B. No ID a b f (a, b) 2 3 X 32

Completely Specifying Boolean Functions Onset Σm (set of minterms where the function is ): All the input conditions for which the output is Offset M(set of maxterms where the function is ): All the input conditions for which the output is Don t cares DC: All the input conditions for which the output is a don t care ID a b g(a,b) X 2 3 We need two of the three sets to represent any function: on-set, off-set, and dc-set Σm(2); M (,3); DC() g(a,b) = Σm(2) + DC() 33

Truth Table K-map with Don t Cares Id a b c f (a,b,c) 2 3 4 5 6 X 7 c = c = (,) (,) (,) (,) 2 6 4 X 3 7 5 34

4-input K-Maps with Don t Cares f(a,b,c,d) = m(,3,5,7,9) + d(6,2,3) without don't cares with don t cares f = B C D + A D f = C D + A D AB CD x x x AB CD x x x don't cares can be treated as s or s depending on which is more advantageous 35

4-input K-Maps with Don t Cares f(a,b,c,d) = m(,3,5,7,9) + d(6,2,3) f = (D ) * (C +A ) AB CD x x x 36

Another Example F = m(, 2, 7, 8, 4, 5) + d(3, 6, 9, 2, 3) 37

Design example: two-bit comparator N N2 A B C D LT EQ GT block diagram and truth table A B < C D A B = C D A B > C D A B C D LT EQ GT we'll need a 4-variable Karnaugh map for each of the 3 output functions 38

Design example: two-bit comparator (cont d) A A A D D D C B C B C B K-map for LT K-map for EQ K-map for GT LT = EQ = GT = A' B' D + A' C + B' C D A' B' C' D' + A' B C' D + A B C D + A B' C D = (A xnor C) (B xnor D) B C' D' + A C' + A B D' LT and GT are similar (flip A/C and B/D) 39

Design example: 2x2-bit multiplier A A2 B B2 block diagram and truth table P P2 P4 P8 A2 A B2 B P8 P4 P2 P 4-variable K-map for each of the 4 output functions 4

Design example: 2x2-bit multiplier (cont d) A2 K-map for P8 K-map for P4 A2 B B B2 B2 A A A2 K-map for P2 K-map for P A2 B B B2 B2 A A 4

Design example: BCD + I I2 I4 I8 block diagram and truth table O O2 O4 O8 I8 I4 I2 I O8 O4 O2 O X X X X X X X X X X X X X X X X X X X X X X X X 4-variable K-map for each of the 4 output functions 42

Design example: BCD + (cont d) I8 X O8 O4 I8 X X I X I I2 X X I4 X X I2 X X I4 X X I8 X O2 O I8 X X I X I I2 X X I4 X X I2 X X I4 X X 43

Examples to illustrate terms A X D C B A D C B 44

Examples to illustrate terms X A D 6 prime implicants: A'B'D, BC', AC, A'C'D, AB, B'CD essential C minimum cover: AC + BC' + A'B'D B A 5 prime implicants: BD, ABC', ACD, A'BC, A'C'D D essential minimum cover: 4 essential implicants C B 45

Algorithm for two-level simplification Algorithm: minimum sum-of-products expression from a Karnaugh map Step : choose an element of the ON-set Step 2: find "maximal" groupings of s and Xs adjacent to that element consider top/bottom row, left/right column, and corner adjacencies this forms prime implicants (number of elements always a power of 2) Repeat Steps and 2 to find all prime implicants Step 3: revisit the s in the K-map if covered by single prime implicant, it is essential, and participates in final cover s covered by essential prime implicant do not need to be revisited Step 4: if there remain s not covered by essential prime implicants select the smallest number of prime implicants that cover the remaining s 46

Algorithm for two-level simplification (example) X A X A X A C X B X A D D X X C B 2 primes around A'BC'D' A D X X C B 2 primes around ABC'D A X X X D D D X X C B 3 primes around AB'C'D' C X X B 2 essential primes X X C B minimum cover (3 primes) 47

Essential primes A Which are the essential prime implicants? A. CD B. BD C. AC D D. All of the above E. None of the above C X X X B X X X D For more practice: think about essential prime implicates! 48