Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012



Similar documents
CSE140: Midterm 1 Solution and Rubric

Simplifying Logic Circuits with Karnaugh Maps

BOOLEAN ALGEBRA & LOGIC GATES

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

Boolean Algebra Part 1

CSE140: Components and Design Techniques for Digital Systems

DESIGN OF GATE NETWORKS

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

CHAPTER 3 Boolean Algebra and Digital Logic

CH3 Boolean Algebra (cont d)

Logic Reference Guide

Chapter 2: Boolean Algebra and Logic Gates. Boolean Algebra

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Two-level logic using NAND gates

Karnaugh Maps (K-map) Alternate representation of a truth table

2.0 Chapter Overview. 2.1 Boolean Algebra

Boolean Algebra (cont d) UNIT 3 BOOLEAN ALGEBRA (CONT D) Guidelines for Multiplying Out and Factoring. Objectives. Iris Hui-Ru Jiang Spring 2010

Unit 3 Boolean Algebra (Continued)

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Lecture 5: Gate Logic Logic Optimization

Boolean Algebra. Boolean Algebra. Boolean Algebra. Boolean Algebra

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

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Switching Algebra and Logic Gates

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

Binary Adders: Half Adders and Full Adders

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

Basic Logic Gates Richard E. Haskell

EE360: Digital Design I Course Syllabus

The string of digits in the binary number system represents the quantity

Logic in Computer Science: Logic Gates

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Digital Electronics Detailed Outline

Gates, Circuits, and Boolean Algebra

A Course Material on DIGITAL PRINCIPLES AND SYSTEM DESIGN

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

Understanding Logic Design

SOLUTIONS MANUAL DIGITAL DESIGN FOURTH EDITION M. MORRIS MANO California State University, Los Angeles MICHAEL D.

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

2011, The McGraw-Hill Companies, Inc. Chapter 3

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Lecture 8: Synchronous Digital Systems

C H A P T E R. Logic Circuits

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Counters and Decoders

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Sum-of-Products and Product-of-Sums expressions

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

3.Basic Gate Combinations

Sistemas Digitais I LESI - 2º ano

Lecture 2. Binary and Hexadecimal Numbers

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

ANALOG & DIGITAL ELECTRONICS

Course Requirements & Evaluation Methods

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Combinational Logic Design

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

DEPARTMENT OF INFORMATION TECHNLOGY

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Combinational Logic Design Process

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC

Combinational circuits

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

Online EFFECTIVE AS OF JANUARY 2013

Useful Number Systems

Scilab Textbook Companion for Digital Electronics: An Introduction To Theory And Practice by W. H. Gothmann 1

ENGI 241 Experiment 5 Basic Logic Gates

SOLVING QUADRATIC EQUATIONS BY THE DIAGONAL SUM METHOD

Algebraic Properties and Proofs

Chapter 1: Digital Systems and Binary Numbers

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

Chapter 7 Memory and Programmable Logic

1.4. Arithmetic of Algebraic Fractions. Introduction. Prerequisites. Learning Outcomes

Computer Engineering 290. Digital Design: I. Lecture Notes Summer 2002

Digital Systems. Syllabus 8/18/2010 1

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

CM2202: Scientific Computing and Multimedia Applications General Maths: 2. Algebra - Factorisation

(1) /30 (2) /30 (3) /40 TOTAL /100

RUTGERS UNIVERSITY Department of Electrical and Computer Engineering 14:332:233 DIGITAL LOGIC DESIGN LABORATORY

Digital Logic Design

Figure 8-1 Four Possible Results of Adding Two Bits

COMPUTER SCIENCE. Paper 1 (THEORY)

Module-I Lecture-I Introduction to Digital VLSI Design Flow

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

Testing & Verification of Digital Circuits ECE/CS 5745/6745. Hardware Verification using Symbolic Computation

BINARY CODED DECIMAL: B.C.D.

Lecture 8: Binary Multiplication & Division

This is a square root. The number under the radical is 9. (An asterisk * means multiply.)

SOLVING QUADRATIC EQUATIONS - COMPARE THE FACTORING ac METHOD AND THE NEW DIAGONAL SUM METHOD By Nghi H. Nguyen

Transcription:

Karnaugh Maps & Combinational Logic Design ECE 52A Winter 22

Reading Assignment Brown and Vranesic 4 Optimized Implementation of Logic Functions 4. Karnaugh Map 4.2 Strategy for Minimization 4.2. Terminology 4.2.2 Minimization Procedure 4.3 Minimization of Product-of-Sums Forms 4.4 Incompletely Specified Functions 4.8 Cubical Representation 4.8. Cubes and Hypercubes January 8, 22 ECE 52A - Digital Design Principles 2

Reading Assignment Roth Introduction Number Systems and Conversion.4 Representation of Negative Numbers.5 Binary Codes 4 Applications of Boolean Algebra Minterm and Maxterm Expansions 4.5 Incompletely Specified Functions January 8, 22 ECE 52A - Digital Design Principles 3

Reading Assignment Roth (cont) 5 Karnaugh Maps 5. Minimum Forms of Switching Functions 5.2 Two- and Three-Variable Karnaugh Maps 5.3 Four-Variable Karnaugh Maps 5.4 Determination of Minimum Expressions Using Essential Prime Implicants 5.5 Five-Variable Karnaugh Maps January 8, 22 ECE 52A - Digital Design Principles 4

Canonical Forms The canonical Sum-of-Products (SOP) and Product-of-Sums (POS) forms can be derived directly from the truth table but are (by definition) not simplified Canonical SOP and POS forms are highest cost, two-level realization of the logic function The goal of simplification and minimization is to derive a lower cost but equivalent logic function January 8, 22 ECE 52A - Digital Design Principles 5

Simplification Reduce cost of implementation by reducing the number of literals and product (or sum) terms Literals correspond to gate inputs and hence both wires and the size (fan-in) of the first level gates in a two-level implementation Product (Sum) terms correspond to the number of gates in the first level of a two-level implementation and the size (fan-in) of the second level gate January 8, 22 ECE 52A - Digital Design Principles 6

Simplification Algebraic Simplification Using theorems and properties of Boolean Algebra Difficult with large number of variables and complex Boolean expressions Most often incorporated into CAD Tools Karnaugh Maps Graphical representation of logic function suitable for manual simplification and minimization January 8, 22 ECE 52A - Digital Design Principles 7

Two-Variable Karnaugh Map Location of minterms and maxterms on a two-variable map Index is the same, expansion is complementary A B A B m m M M m 2 m 3 M 2 M 3 January 8, 22 ECE 52A - Digital Design Principles 8

Two-Variable Karnaugh Map Simplification using xy + xy = x and x + x y = x + y F= Σ m (,2,3) A B F = A B + AB + AB F = B (A + A) + AB F = B + AB F = (B + A) (B + B) F = B + A January 8, 22 ECE 52A - Digital Design Principles 9

Three-Variable Karnaugh Map Location of three-variable minterms A BC m m m 3 m 2 m 4 m 5 m 7 m 6 January 8, 22 ECE 52A - Digital Design Principles

Three-Variable Karnaugh Map Adjacent cells differ in the value of only one variable Known as Gray coding Topological adjacency equates to algebraic adjacency January 8, 22 ECE 52A - Digital Design Principles

Three-Variable Karnaugh Map Three Variable Sum-of-Products Simplification Groupings of 4 (2 2 ) A BC F = A B C + AB C + A BC + ABC F = (A + A) B C + (A + A) BC F = B C + BC F = (B + B) C F = C January 8, 22 ECE 52A - Digital Design Principles 2

Three-Variable Karnaugh Map Three Variable Product-of-Sums Simplification Groupings of 4 (2 2 ) A BC A+B+C A+B +C A+C F = C A +C A +B+C A +B +C January 8, 22 ECE 52A - Digital Design Principles 3

Four-Variable Karnaugh Map Location of four-variable minterms AB CD m m m 3 m 2 m 4 m 5 m 7 m 6 m 2 m 3 m 5 m 4 m 8 m 9 m m January 8, 22 ECE 52A - Digital Design Principles 4

Four-Variable Karnaugh Map Four-bit Gray code January 8, 22 ECE 52A - Digital Design Principles 5

Four-Variable Sum-of-Products Map AB CD B CD F = A + B CD A January 8, 22 ECE 52A - Digital Design Principles 6

Implementation with AND/OR/NOT & NAND gates January 8, 22 ECE 52A - Digital Design Principles 7

Four-Variable Product-of-Sums Map AB CD (A + C) (A + D) F = (A + B )(A + C)(A + D) (A + B ) January 8, 22 ECE 52A - Digital Design Principles 8

Algebraic conversion between SOP and POS forms Multiplying out Factoring POS SOP SOP POS F = (A + B )(A + C)(A + D) A + B A + C AA + AB AC + B C A + AB + AC + B C A + B C A + D AA + AB C + AD + B CD F = A + B CD F = (A + B )(A + CD) F = (A + B )(A + C)(A + D) F = A + B CD January 8, 22 ECE 52A - Digital Design Principles 9

Five-Variable Karnaugh Maps BC DE A B D BC DE AB C A= B CD BCDE A= January 8, 22 ECE 52A - Digital Design Principles 2

Six-Variable Karnaugh Map CD EF CD EF AB= B DF AB= C DF CD EF ADF CD EF AB= AB= January 8, 22 ECE 52A - Digital Design Principles 2

Terminology Literal An appearance of a variable or its complement Implicant Any minterm and/or product term for which the value of the function equals (in SOP form) or any maxterm and/or sum term for which the value of the function equals (in POS form) January 8, 22 ECE 52A - Digital Design Principles 22

Terminology Prime Implicant An implicant that cannot be combined into another implicant that has fewer literals Essential Prime Implicant A prime implicant that includes at least one minterm not covered by any other prime implicant January 8, 22 ECE 52A - Digital Design Principles 23

Terminology Cover A collection of implicants that accounts for (covers) all minterms (or maxterms) for which a given function equals in SOP form (or in POS form) Cost An heuristic figure of merit determined generally from the number of product (sum) terms and the number of literals in a given cover January 8, 22 ECE 52A - Digital Design Principles 24

Minimization Procedure Generate all prime implicants for the given function Find the set of all essential prime implicants If the set of essential prime implicants covers the function, this set is the desired cover Otherwise, determine the nonessential prime implicants that should be added to form a complete, minimal cost cover January 8, 22 ECE 52A - Digital Design Principles 25

Minimization Example CD AB Implicants (minterms) 6 Prime Implicants BC, AB, AC, B CD, A B D, A C D 2 Essential Prime Implicants BC, AC Final Cover with A B D F= A B D + BC + AC January 8, 22 ECE 52A - Digital Design Principles 26

Combinational Logic Circuit Design Specify combinational function using Truth Table, Karnaugh Map, or Canonical sum of minterms (product of maxterms) This is the creative part of digital design Design specification may lend itself to any of the above forms January 8, 22 ECE 52A - Digital Design Principles 27

Combinational Logic Circuit Design Find minimal POS or SOP form of the logic function Technology can determine whether POS or SOP is appropriate solution Nature of function and cost of implementation can determine whether POS or SOP is better solution January 8, 22 ECE 52A - Digital Design Principles 28

Combinational Logic Circuit Design Implement design using AND/OR (or NAND) gates or OR/AND (or NOR) gates In most technologies NAND and NOR implementations are superior In terms of both size and speed Simulate design and verify functionality and performance Design should always be verified before committing to fabrication January 8, 22 ECE 52A - Digital Design Principles 29

Combinational Design Example Design Specification Design a logic network that takes as its input a 4- bit, one s complement number and generates a if that number is odd ( is not odd) Label the inputs A, B, C and D, where A is the most significant bit Implement your design in standard sum-ofproducts representation using only NAND gates January 8, 22 ECE 52A - Digital Design Principles 3

Combinational Design Example Recall representation of fixed-point, signed and unsigned numbers from ECE 5A (lecture #4) Binary Unsigned Sign- Magnitude One s Complement Two s Complement + + 2 2 2 2 3 3 3 3 4 - -3-4 5 - -2-3 6-2 - -2 7-3 - - January 8, 22 ECE 52A - Digital Design Principles 3

January 8, 22 ECE 52A - Digital Design Principles 32 Design Example Truth Table Odd, One s complement numbers F D C B A

Design Example Karnaugh Map AB CD F = A D + AD January 8, 22 ECE 52A - Digital Design Principles 33

Incompletely Specified Functions Some logic functions have input combinations that can never occur Examples: Sensors indicating a mutually exclusive event has occurred Processor flags indicating a result was both positive and negative Interlocked switches that can never be closed at the same time January 8, 22 ECE 52A - Digital Design Principles 34

Incompletely Specified Functions Conditions called don t cares For minterms/maxterms associated with don t care input combinations, assign output value of or to generate the minimum cost cover On Karnaugh Map, represent don t cares with X and group with minterms (maxterms) to create prime implicants Any X s not covered can be ignored and will default to (in SOP form) or (in POS form) January 8, 22 ECE 52A - Digital Design Principles 35

Design Example 2 Design Specification Design a combinational circuit that takes as its input a Binary Coded Decimal (BCD) digit (four bits) and outputs a if the input is an even number (not zero) Recall Binary Coded Decimal representation from ECE 5A Not most economical representation valid combinations per 4 bits valid combinations per byte January 8, 22 ECE 52A - Digital Design Principles 36

Design Example 2 BCD Example BCD Value BCD Value 8 9 2 X 3 X 4 X 5 X 6 X 7 X January 8, 22 ECE 52A - Digital Design Principles 37

Design Example 2 Canonical Forms for Incompletely Specified Functions For design example, function determined directly from design specification Even numbers, not m(2,4,6,8) d(,,2,3,4,5) M (,,3,5,7,9) d(,,2,3,4,5) January 8, 22 ECE 52A - Digital Design Principles 38

Design Example 2 SOP Karnaugh Map AB CD X X X X F = BD + AD + CD X X January 8, 22 ECE 52A - Digital Design Principles 39

Design Example 2 POS Karnaugh Map AB CD X X X X F = D (A + B + C) X X January 8, 22 ECE 52A - Digital Design Principles 4

Design Example 3 Design Specification In this problem, you are to design the combinational circuit that controls the ceiling lights in my downstairs hallway There are three wall switches: one at the front door (A), one at the back door (B) and one in the family room (C) When I walk in the front door, the ceiling lights are off, the A switch is ON and both the B and C switches are OFF From these initial conditions, changing the position of any switch should turn the lights on; changing the position of any switch (again) should turn the lights off, etc. January 8, 22 ECE 52A - Digital Design Principles 4

Design Example 3 Karnaugh Map A BC Initial Conditions: A=, B=, C= and F= Changing the position of any switch causes the light to come on Changing the position of any switch again causes the light to go off And finally F = A B C + AB C + A BC + ABC = XNOR (A,B,C) January 8, 22 ECE 52A - Digital Design Principles 42

Design Example Review From Design Specification to Implementation: Example Generate truth table from specification Example 2 Generate sum of minterms (product of maxterms) from specification Example 3 Generate Karnaugh map from specification January 8, 22 ECE 52A - Digital Design Principles 43