L2: Combinational Logic Design (Construction and Boolean Algebra)

Similar documents
L2: Combinational Logic Design (Construction and Boolean Algebra)

L2: Combinational Logic Design (Construction and Boolean Algebra)

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

Possible logic functions of two variables

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

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

Combinational Logic (mostly review!)

EECS Variable Logic Functions

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

Chapter 2 Combinational logic

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

Part 5: Digital Circuits

Combinational Logic. Review of Combinational Logic 1

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

Lecture A: Logic Design and Gates

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

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

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

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

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

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

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

Digital Design 2. Logic Gates and Boolean Algebra

Combinational Logic Fundamentals

Combinational Logic Design Principles

CPE100: Digital Logic Design I

Show that the dual of the exclusive-or is equal to its compliment. 7

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

Lecture 2 Review on Digital Logic (Part 1)

ELCT201: DIGITAL LOGIC DESIGN

Lecture 2. Notes. Notes. Notes. Boolean algebra and optimizing logic functions. BTF Electronics Fundamentals August 2014

COMP2611: Computer Organization. Introduction to Digital Logic

Unit 2 Session - 6 Combinational Logic Circuits

211: Computer Architecture Summer 2016

Switches: basic element of physical implementations

Chapter 2 Boolean Algebra and Logic Gates

Combinatorial Logic Design Principles

CHAPTER 12 Boolean Algebra

Logic Gates and Boolean Algebra

Minimization techniques

EC-121 Digital Logic Design

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

Number System conversions

Chapter 2: Boolean Algebra and Logic Gates

Digital Integrated Circuits A Design Perspective

Every time has a value associated with it, not just some times. A variable can take on any value within a range

Logic Design. Chapter 2: Introduction to Logic Circuits

Week-I. Combinational Logic & Circuits

CMPEN 411 VLSI Digital Circuits Spring 2011 Lecture 07: Pass Transistor Logic

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

Standard Expression Forms

CPE100: Digital Logic Design I

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

EEC 118 Lecture #6: CMOS Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

ENG2410 Digital Design Combinational Logic Circuits

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

MC9211 Computer Organization

Digital Logic (2) Boolean Algebra

CHAPTER 3 LOGIC GATES & BOOLEAN ALGEBRA

CHAPTER1: Digital Logic Circuits Combination Circuits

Integrated Circuits & Systems

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR

Gate-Level Minimization

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

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

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

Chap 2. Combinational Logic Circuits

Algebraic Methods for the Analysis and Synthesis

ECE 546 Lecture 10 MOS Transistors

Lecture 1. Notes. Notes. Notes. Introduction. Introduction digital logic February Bern University of Applied Sciences

Logic Design Combinational Circuits. Digital Computer Design

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

Digital Integrated Circuits A Design Perspective

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

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

Midterm1 Review. Jan 24 Armita

Boolean Algebra and logic gates

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

CHAPTER III BOOLEAN ALGEBRA

Working with combinational logic

UNIT 5 KARNAUGH MAPS Spring 2011

Chapter 2 Boolean Algebra and Logic Gates

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Electronics. Overview. Introducction to Synthetic Biology

Review for Test 1 : Ch1 5

Chapter 2: Switching Algebra and Logic Circuits

Chapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

EEC 116 Lecture #5: CMOS Logic. Rajeevan Amirtharajah Bevan Baas University of California, Davis Jeff Parkhurst Intel Corporation

DIGITAL ELECTRONICS & it0203 Semester 3

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

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

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

Cs302 Quiz for MID TERM Exam Solved

Gates and Logic: From switches to Transistors, Logic Gates and Logic Circuits

Chapter 2. Boolean Algebra and Logic Gates

Administrative Notes. Chapter 2 <9>

Transcription:

L2: Combinational Logic Design (Construction and oolean lgebra) cknowledgements: Materials in this lecture are courtesy of the following people and used with permission. - Randy H. Katz (University of California, erkeley, Department of Electrical Engineering & Computer Science) - Gaetano orriello (University of Washington, Department of Computer Science & Engineering, http://www.cs.washington.edu/37) - Rabaey,. Chandrakasan,. Nikolic. Digital Integrated Circuits: Design Perspective. Prentice Hall, 23. L2: 6. Spring 24 Introductory Digital Systems Laboratory

The Inverter IN OUT Truth Table IN OUT "" V OH V IH V(y) V OH Slope = - Undefined Region NM L = V IL -V OL NM H = V OH -V IH V IL Slope = - "" V OL V OL V OL V IL V IH V OH V(x) Large noise margins protect against various noise sources L2: 6. Spring 24 Introductory Digital Systems Laboratory 2

MOS Technology: The NMOS Switch source gate drain D N+ P-substrate N+ G V T = V S V s RNMOS RNMOS Switch Model OFF V GS < V T ON V GS > V T NMOS ON when Switch Input is High L2: 6. Spring 24 Introductory Digital Systems Laboratory 4

PMOS: The Complementary Switch source gate drain S P+ P+ N-substrate G V T = -V D Switch V s RPMOS RPMOS OFF ON Model V GS > V T V GS < V T PMOS ON when Switch Input is Low L2: 6. Spring 24 Introductory Digital Systems Laboratory 5

The CMOS Inverter V DD Switch Model V DD G S R PMOS IN D D OUT IN OUT G R NMOS S IN Rail-to-rail Swing in CMOS L2: 6. Spring 24 Introductory Digital Systems Laboratory 6

Possible Function of Two Inputs There are 6 possible functions of 2 input variables: X Y F X Y 6 possible functions (F F 5 ) X ND Y X Y X XOR Y X OR Y X = Y X NOR Y NOT (X OR Y) NOT Y NOT X X NND Y NOT (X ND Y) In general, there are 2 (2^n) functions of n inputs L2: 6. Spring 24 Introductory Digital Systems Laboratory 7

Common Logic Gates Gate Symbol Truth-Table Expression X Y Z NND X Y Z Z = X Y X Y Z ND X Y Z Z = X Y X Y Z NOR X Y Z Z = X + Y X Y Z OR X Y Z Z = X + Y L2: 6. Spring 24 Introductory Digital Systems Laboratory 8

Exclusive (N)OR Gate XOR (X Y) X Y Z X Y Z Z = X Y + X Y X or Y but not both ("inequality", "difference") XNOR (X Y) X Y Z X Y Z Z = X Y + X Y X and Y the same ("equality") Widely used in arithmetic structures such as adders and multipliers L2: 6. Spring 24 Introductory Digital Systems Laboratory 9

Generic CMOS Recipe V dd... F(,, n ) n...... pullup: make this connection when we want F(,, n ) = pulldown: make this connection when we want F(,, n ) = Note: CMOS gates result in inverting functions! (easier to build NND vs. ND) PUN PDN C L O PDN PUN O ff n ff n ff n n ff How do you build a 2-input NOR Gate? L2: 6. Spring 24 Introductory Digital Systems Laboratory

Theorems of oolean lgebra (I) Elementary. X + = X D. X = X 2. X + = 2D. X = 3. X + X = X 3D. X X = X 4. (X) = X 5. X + X = 5D. X X = Commutativity: 6. X + Y = Y + X 6D. X Y = Y X ssociativity: 7. (X + Y) + Z = X + (Y + Z) 7D. (X Y) Z = X (Y Z) Distributivity: 8. X (Y + Z) = (X Y) + (X Z) 8D. X + (Y Z) = (X + Y) (X + Z) Uniting: 9. X Y + X Y = X 9D. (X + Y) (X + Y) = X bsorption:. X + X Y = X D. X (X + Y) = X. (X + Y) Y = X Y D. (X Y) + Y = X + Y L2: 6. Spring 24 Introductory Digital Systems Laboratory

Theorems of oolean lgebra (II) Factoring: 2. (X Y) + (X Z) = 2D. (X + Y) (X + Z) = X (Y + Z) X + (Y Z) Consensus: 3. (X Y) + (Y Z) + (X Z) = 3D. (X + Y) (Y + Z) (X + Z) = X Y + X Z (X + Y) (X + Z) De Morgan's: 4. (X + Y +...) = X Y... 4D. (X Y...) = X + Y +... Generalized De Morgan's: 5. f(x,x2,...,xn,,,+, ) = f(x,x2,...,xn,,,,+) Duality Dual of a oolean expression is derived by replacing by +, + by, by, and by, and leaving variables unchanged f (X,X2,...,Xn,,,+, ) f(x,x2,...,xn,,,,+) L2: 6. Spring 24 Introductory Digital Systems Laboratory 2

Simple Example: One it dder -bit binary adder inputs:,, Carry-in outputs: Sum, Carry-out Cin S Cout Cin S Cout Product term (or minterm) Sum-of-Products Canonical Form S = Cin + Cin + Cin + Cin Cout = Cin + Cin + Cin + Cin NDed product of literals input combination for which output is true Each variable appears exactly once, in true or inverted form (but not both) L2: 6. Spring 24 Introductory Digital Systems Laboratory 3

Simplify oolean Expressions Cout = Cin + Cin + Cin + Cin = Cin + Cin + Cin + Cin + Cin + Cin = ( + ) Cin + ( + ) Cin + (Cin + Cin) = Cin + Cin + = ( + ) Cin + S = Cin + Cin + Cin + Cin =( + )Cin + ( + ) Cin =( ) Cin + ( ) Cin = Cin L2: 6. Spring 24 Introductory Digital Systems Laboratory 4

Sum-of of-products & Product-of of-sum Product term (or minterm): NDed product of literals input combination for which output is true C minterms C m C m C m2 C m3 C m4 C m5 C m6 C m7 short-hand notation form in terms of 3 variables F in canonical form: F(,, C) = Σm(,3,5,6,7) = m + m3 + m5 + m6 + m7 F = C + C+ C + C + C canonical form minimal form F(,, C) = C + C + C + C + C = ( + + + )C + C = (( + )( + ))C + C = C + C = C + C = + C Sum term (or maxterm) - ORed sum of literals input combination for which output is false C maxterms + + C M F in canonical form: + + C M F(,, C) = ΠM(,2,4) + + C M2 = M M2 M4 + + C M3 = ( + + C) ( + + C) ( + + C) + + C M4 canonical form minimal form + + C M5 F(,, C) = ( + + C) ( + + C) ( + + C) + +C M6 = ( + + C) ( + + C) + + C M7 ( + + C) ( + + C) = ( + C) ( + C) short-hand notation for maxterms of 3 variables L2: 6. Spring 24 Introductory Digital Systems Laboratory 5

Mapping etween Forms. Minterm to Maxterm conversion: rewrite minterm shorthand using maxterm shorthand replace minterm indices with the indices not already used E.g., F(,,C) = Σm(3,4,5,6,7) = ΠM(,,2) 2. Maxterm to Minterm conversion: rewrite maxterm shorthand using minterm shorthand replace maxterm indices with the indices not already used E.g., F(,,C) = ΠM(,,2) = Σm(3,4,5,6,7) 3. Minterm expansion of F to Minterm expansion of F': in minterm shorthand form, list the indices not already used in F E.g., F(,,C) = Σm(3,4,5,6,7) F'(,,C) = Σm(,,2) = ΠM(,,2) = ΠM(3,4,5,6,7) 4. Minterm expansion of F to Maxterm expansion of F': rewrite in Maxterm form, using the same indices as F E.g., F(,,C) = Σm(3,4,5,6,7) F'(,,C) = ΠM(3,4,5,6,7) = ΠM(,,2) = Σm(,,2) L2: 6. Spring 24 Introductory Digital Systems Laboratory 6

The Uniting Theorem Key tool to simplification: ( + ) = 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 F F = + = ( +) = has the same value in both on-set rows remains has a different value in the two rows is eliminated L2: 6. Spring 24 Introductory Digital Systems Laboratory 7

oolean Cubes Just another way to represent truth table Visual technique for identifying when the uniting theorem can be applied n input variables = n-dimensional "cube" -cube X Y X XY 2-cube Y Z XYZ X 3-cube Y Z W X 4-cube WXYZ L2: 6. Spring 24 Introductory Digital Systems Laboratory 8

Mapping truth tables onto oolean cubes Uniting theorem Circled group of the on-set is called the F F adjacency plane. Each adjacency plane corresponds to a product term. ON-set = solid nodes OFF-set = empty nodes varies within face, does not this face represents the literal Three variable example: inary full-adder carry-out logic Cin Cout (+)Cin C (Cin+Cin) Cout = Cin++Cin (+)Cin The on-set is completely covered by the combination (OR) of the subcubes of lower dimensionality - note that is covered three times L2: 6. Spring 24 Introductory Digital Systems Laboratory 9

Higher Dimension Cubes F(,,C) = Σm(4,5,6,7) C on-set forms a square i.e., a cube of dimension 2 (2-D adjacency plane) represents an expression in one variable i.e., 3 dimensions 2 dimensions is asserted (true) and unchanged and C vary This subcube represents the literal In a 3-cube (three variables): -cube, i.e., a single node, yields a term in 3 literals -cube, i.e., a line of two nodes, yields a term in 2 literals 2-cube, i.e., a plane of four nodes, yields a term in literal 3-cube, i.e., a cube of eight nodes, yields a constant term "" In general, m-subcube within an n-cube (m < n) yields a term with n m literals L2: 6. Spring 24 Introductory Digital Systems Laboratory 2

Karnaugh Maps lternative 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 in a linear truth-table 2 3 Numbering scheme based on Gray code F e.g.,,,, (only a single bit changes in code for adjacent map cells) 2-variable K-map 3-variable K-map C 2 3 2 3 6 7 4 5 C L2: 6. Spring 24 Introductory Digital Systems Laboratory 2 CD 3 2 4 5 7 6 2 3 5 4 8 9 D 4-variable K-map

K-Map Examples Cin C Cout = F(,,C) = C C F(,,C) = Σm(,4,5,7) F = F' simply replace 's with 's and vice versa F'(,,C) = Σm(,2,3,6) F' = L2: 6. Spring 24 Introductory Digital Systems Laboratory 22

Four Variable Karnaugh Map CD F(,,C,D) = Σm(,2,3,5,6,7,8,,,4,5) F = C + D + D C D Find the smallest number of the largest possible subcubes that cover the ON-set C D K-map Corner djacency Illustrated in the 4-Cube L2: 6. Spring 24 Introductory Digital Systems Laboratory 23

K-Map Example: Don t Cares Don't Cares can can be be treated as as 's 's or or 's 's if if it it is is advantageous to to do do so so CD X F(,,C,D) = Σm(,3,5,7,9) + Σd(6,2,3) F = D + C D w/o don't cares C X X D F = C D + D w/ don't cares y treating this DC as a "", a 2-cube can be formed rather than one -cube CD X In PoS form: F = D ( + C) Equivalent answer as above, but fewer literals C X X D L2: 6. Spring 24 Introductory Digital Systems Laboratory 24

Hazards L2: 6. Spring 24 Introductory Digital Systems Laboratory 25

Fixing Hazards In general, it is difficult to avoid hazards need a robust design methodology to deal with hazards. L2: 6. Spring 24 Introductory Digital Systems Laboratory 26