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)

Chapter 2 Combinational logic

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

Possible logic functions of two variables

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

Combinational Logic. Review of Combinational Logic 1

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

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

EECS Variable Logic Functions

Lecture A: Logic Design and Gates

Unit 2 Session - 6 Combinational Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

ECE 546 Lecture 10 MOS Transistors

Combinational Logic (mostly review!)

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

Chapter 2: Boolean Algebra and Logic Gates

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

CHAPTER III BOOLEAN ALGEBRA

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

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

CHAPTER III BOOLEAN ALGEBRA

CMPEN 411 VLSI Digital Circuits. Lecture 04: CMOS Inverter (static view)

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

Logic Design. Chapter 2: Introduction to Logic Circuits

CPE100: Digital Logic Design I

Integrated Circuits & Systems

Number System conversions

CPE100: Digital Logic Design I

Boolean Algebra and logic gates

Chapter 2. Boolean Algebra and Logic Gates

Cs302 Quiz for MID TERM Exam Solved

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

Chapter 2 Boolean Algebra and Logic Gates

ENG2410 Digital Design Combinational Logic Circuits

Lecture 2 Review on Digital Logic (Part 1)

Digital Logic Circuits - Switching Algebra - Combinational Circuits -

Week-I. Combinational Logic & Circuits

Digital Logic (2) Boolean Algebra

Chapter 2 Boolean Algebra and Logic Gates

Combinational Logic Fundamentals

EC-121 Digital Logic Design

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

Switches: basic element of physical implementations

211: Computer Architecture Summer 2016

Gate-Level Minimization

Chapter 2 Combinational Logic Circuits

Midterm1 Review. Jan 24 Armita

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

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

Chapter 2 Combinational Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits

ELEC Digital Logic Circuits Fall 2014 Switching Algebra (Chapter 2)

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Chap 2. Combinational Logic Circuits

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

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

MC9211 Computer Organization

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

Combinational Logic Design Principles

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

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

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

Combinatorial Logic Design Principles

ECE 342 Electronic Circuits. Lecture 34 CMOS Logic

Standard Expression Forms

THE INVERTER. Inverter

Administrative Notes. Chapter 2 <9>

DC and Transient Responses (i.e. delay) (some comments on power too!)

Chapter 7 Logic Circuits

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

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

CMOS Inverter (static view)

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

This form sometimes used in logic circuit, example:

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

EEE130 Digital Electronics I Lecture #4

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

MODULAR CIRCUITS CHAPTER 7

CMOS INVERTER. Last Lecture. Metrics for qualifying digital circuits. »Cost» Reliability» Speed (delay)»performance

Digital Integrated Circuits A Design Perspective

Boolean Algebra & Logic Gates. By : Ali Mustafa

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

Integrated Circuits & Systems

DIGITAL ELECTRONICS & it0203 Semester 3

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Chapter 2 : Boolean Algebra and Logic Gates

Lecture 6: DC & Transient Response

CHAPTER 7. Exercises 17/ / /2 2 0

Boolean Algebra, Gates and Circuits

Today s lecture. EE141- Spring 2003 Lecture 4. Design Rules CMOS Inverter MOS Transistor Model

CHAPTER1: Digital Logic Circuits Combination Circuits

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

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

Chapter 2 Combinational Logic Circuits

Digital Logic Design. Combinational Logic

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

CHAPTER 12 Boolean Algebra

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Transcription:

L2: Combinational Logic Design (Construction and Boolean Algebra) Acknowledgements: Lecture material adapted from Chapter 2 of R. Katz, G. Borriello, Contemporary Logic Design (second edition), Pearson Education, 25. Some lecture material adapted from J. Rabaey, A. Chandrakasan, B. Nikolic, Digital Integrated Circuits: A Design Perspective Copyright 23 Prentice Hall/Pearson. Lecture Based on Notes by Professor Anantha Chandrakasan

Review: Noise Margin Truth Table IN OUT 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 2

TTL Logic Style (97 s-early 8 s) C + B + v BE - E v CE - Q Q2 Q3 74LS4 (courtesy TI) 3

MOS Technology: The NMOS Switch source gate drain D N+ N+ G V T =.5V P-substrate S V s Switch Model OFF R NMOS V GS < V T ON R NMOS V GS > V T NMOS ON when Switch Input is High 4

NMOS Device Characteristics Polysilicon Aluminum 6 x -4 VGS= 2.5 V 5 4 Resistive Saturation VGS= 2. V I D (A) 3 2 VGS=.5 V VGS=. V D.5.5 2 2.5 V DS (V) G + V GS - S I D V T =.5V MOS is a very non-linear. Switch-resistor model sufficient for first order analysis. 5

PMOS: The Complementary Switch source gate drain S P+ P+ G V T = -.5V N-substrate D V DD Switch OFF R PMOS ON R PMOS Model V GS > V T V GS < V T PMOS ON when Switch Input is Low 6

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 7

Inverter VTC: Load Line Analysis V DD G S D IN OUT D G S 2.5 2 CMOS gates have: Rail-to-rail swing (V to V DD ) Large noise margins zero static power dissipation.5.5 2 2.5 V (V) in 8 V out (V).5.5

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 AND Y X Y X XOR Y X OR Y X = Y X NOR Y NOT (X OR Y) NOT Y NOT X X NAND Y NOT (X AND Y) In general, there are 2 (2^n) functions of n inputs 9

Common Logic Gates Gate Symbol Truth-Table Expression X Y Z NAND X Y Z Z = X Y X Y Z AND 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

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 multipl

Generic CMOS Recipe V dd... A F(A,,A n ) A n...... pullup: make this connection when we want F(A,,A n ) = pulldown: make this connection when we want F(A,,A n ) = Note: CMOS gates result in inverting functions! (easier to build NAND vs. AND) A B A A PDN B B PUN C L O A B PDN PUN O ff n ff n ff n n ff How do you build a 2-input NOR Gate? 2

Theorems of Boolean Algebra (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 Associativity: 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 Absorption:. X + X Y = X D. X (X + Y) = X. (X + Y) Y = X Y D. (X Y) + Y = X + Y 3

Theorems of Boolean Algebra (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 Boolean expression is derived by replacing by +, + by, by, and by, and leaving variables unchanged f (X,X2,...,Xn,,,+, ) f(x,x2,...,xn,,,,+) 4

Simple Example: One Bit Adder -bit binary adder inputs: A, B, Carry-in outputs: Sum, Carry-out A B Cin S Cout A B Cin S Cout Product term (or minterm) Sum-of-Products Canonical Form S = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin + A B Cin + A B Cin ANDed product of literals input combination for which output is true Each variable appears exactly once, in true or inverted form (but not both) 5

Simplify Boolean Expressions Cout = A B Cin + A B Cin + A B Cin + A B Cin = A B Cin + A B Cin + A B Cin + A B Cin + A B Cin + A B Cin = (A + A) B Cin + A (B + B) Cin + A B (Cin + Cin) = B Cin + A Cin + A B = (B + A) Cin + A B S = A B Cin + A B Cin + A B Cin + A B Cin =( A B + A B )Cin + (A B + A B) Cin =(A B) Cin + (A B) Cin = A B Cin 6

Sum-of-Products & Product-of-Sum Product term (or minterm): ANDed product of literals input combination for which output is true A B C minterms 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 short-hand notation form in terms of 3 variables F in canonical form: F(A, B, C) = Σm(,3,5,6,7) = m + m3 + m5 + m6 + m7 F = A B C + A B C+ A B C + A B C + ABC canonical form minimal form F(A, B, C) = A B C + A B C + AB C + ABC + ABC = (A B + A B + AB + AB)C + ABC = ((A + A)(B + B))C + ABC = C + ABC = ABC + C = AB + C Sum term (or maxterm) - ORed sum of literals input combination for which output is false A B C maxterms A + B + C M F in canonical form: A + B + C M F(A, B, C) = ΠM(,2,4) A + B + C M2 = M M2 M4 A + B + C M3 = (A + B + C) (A + B + C) (A + B + C) A + B + C M4 canonical form minimal form A + B+ C M5 F(A, B, C) = (A + B + C) (A + B + C) (A + B + C) A + B +C M6 = (A + B + C) (A + B + C) A +B + C M7 (A + B + C) (A + B + C) = (A + C) (B + C) short-hand notation for maxterms of 3 variables 7

The Uniting Theorem Key tool to simplification: A (B + B) = A 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 +AB = (A +A)B = B B has the same value in both on-set rows B remains A has a different value in the two rows A is eliminated 8

Boolean 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 9

Mapping Truth Tables onto Boolean Cubes Uniting theorem Circled group of the on-set is called the A B F B F A adjacency plane. Each adjacency plane corresponds to a product term. ON-set = solid nodes OFF-set = empty nodes A varies within face, B does not this face represents the literal B Three variable example: Binary full-adder carry-out logic A B Cin Cout (A+A)BCin B C A AB(Cin+Cin) Cout = BCin+AB+ACin A(B+B)Cin The on-set is completely covered by the combination (OR) of the subcubes of lower dimensionality - note that is covered three times 2

Higher Dimension Cubes F(A,B,C) = Σm(4,5,6,7) B C A 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 A is asserted (true) and unchanged B and C vary This subcube represents the literal A 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 2

Karnaugh Maps 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 in a linear truth-table A B 2 3 A B F Numbering scheme based on Gray code e.g.,,,, (only a single bit changes in code for adjacent map cells) 2-variable K-map 3-variable K-map A B C AB 2 3 2 3 A 6 7 4 5 C B 22 AB CD 3 2 4 5 7 6 A B 2 3 5 4 8 9 D 4-variable K-map

K-Map Examples Cout = F(A,B,C) = F(A,B,C) = Σm(,4,5,7) F = F' simply replace 's with 's and vice versa F'(A,B,C) = Σm(,2,3,6) 23 F' =

Four Variable Karnaugh Map F(A,B,C,D) = Σm(,2,3,5,6,7,8,,,4,5) F = C + A B D + B D Find the smallest number of the largest possible subcubes that cover the ON-set C D A B K-map Corner Adjacency Illustrated in the 4-Cube 24

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

Hazards 26

Fixing Hazards In general, it is difficult to avoid hazards need a robust design methodology to deal with hazards. 27