1 COMP541 Combinational Logic - 3 Montek Singh Jan 21, 2015.

Slides:



Advertisements
Similar presentations
Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
Advertisements

Combinational Circuits
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
ECE 331 – Digital System Design
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
1 COMP541 Combinational Logic - 2 Montek Singh Jan 18, 2007.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 2 Combinational Logic Design.
Canonical Forms and Logic Miniminization
1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.
CSCE 211: Digital Logic Design
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Chapter 2: Boolean Algebra and Logic Functions
Chapter 2 Combinational Systems And / Or / Not. TRIAD PRINCIPLE: Combinational is about And / Or / Not combinations As well as equivalent functions. It.
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
1 COMP541 Combinational Logic - 3 Montek Singh Jan 21, 2010.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Combinational Logic 1.
1 COMP541 Combinational Logic - 4 Montek Singh Jan 30, 2012.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Combinational Logic Part 2: Karnaugh maps (quick).
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
Computer Organization and Design Transistors & Logic - II Montek Singh Oct {21,28}, 2015 Lecture 10.
ENG241 Digital Design Week #2 Combinational Logic Circuits.
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
June 11, 2002© Howard Huang1 Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn.
Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Chapter 2 Digital Design and Computer Architecture, 2 nd Edition Chapter 2 David Money Harris and Sarah L. Harris.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 COMP541 Combinational Logic - 3 Montek Singh Jan 23, 2012.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
1 COMP541 Combinational Logic - II Montek Singh Jan 18, 2012.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
KU College of Engineering Elec 204: Digital Systems Design 1 Review D: n bit binary number D = (d n-1 ∙ ∙ ∙ d 1 d 0 ) 2 If D is an unsigned binary number.
Circuit Synthesis A logic function can be represented in several different forms:  Truth table representation  Boolean equation  Circuit schematic 
Boolean Algebra & Logic Gates
Digital Logic.
COMP541 Combinational Logic - 3
COSC3330 Computer Architecture Lecture 2. Combinational Logic
Morgan Kaufmann Publishers
Chapter 2: Boolean Algebra and Logic Functions
COMP541 Combinational Logic - II
ECE 2110: Introduction to Digital Systems
ECE 3110: Introduction to Digital Systems
COMP541 Combinational Logic - 3
Computer Organization and Design Transistors & Logic - II
ECE 331 – Digital System Design
Modified from John Wakerly Lecture #2 and #3
Digital Systems Design
COMP541 Combinational Logic - II
Chapter 2 Introduction to Logic Circuits
From now on: Combinatorial Circuits:
COMP541 Combinational Logic - II
COMP541 Combinational Logic - 3
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Lecture 2: Combinational Logic Design
Presentation transcript:

1 COMP541 Combinational Logic - 3 Montek Singh Jan 21, 2015

Today’s Topics 2  Synthesis: from truth table to logic implementation from truth table to logic implementation  Schematic drawing conventions  Non-Boolean values “Don’t Cares”, or X values “Don’t Cares”, or X values “Floating values”, or Z values “Floating values”, or Z values

3 Mechanically Go From Truth Table to Function

4 From Truth Table to Logic Equation  Consider a truth table Standard sum-of-products implementation Standard sum-of-products implementation  OR of all product terms that are 1  For each row where output is 1 –write the minterm »called “ON-set minterm” –OR all of these minterms

5 Standard Forms  Not necessarily simplest F But it is a systematic way to go from truth table to function But it is a systematic way to go from truth table to function  Definitions: “Literal”: a single variable, complemented or not  Ā “Literal”: a single variable, complemented or not  Ā “Product terms”: AND of literals  ĀBZ “Product terms”: AND of literals  ĀBZ “Sum terms”: OR of product terms  X + Ā “Sum terms”: OR of product terms  X + Ā This is logical product and sum, not arithmetic This is logical product and sum, not arithmetic

6 Definition: Minterm  Product term in which all variables appear once (complemented or not) each minterm is 1 in exactly one row, 0 elsewhere each minterm is 1 in exactly one row, 0 elsewhere

7 Number of Minterms  For n variables, there will be 2 n minterms Like binary numbers from 0 to 2 n -1 Like binary numbers from 0 to 2 n -1 Often numbered same way (often in decimal) Often numbered same way (often in decimal)

8Maxterms  Sum term in which all variables appear once (complemented or not) each maxterm is 0 in exactly one row, 1 elsewhere each maxterm is 0 in exactly one row, 1 elsewhere

9 Minterm related to Maxterm  Minterm and maxterm with same subscripts are complements  Example

10 Implementation: Sum of Minterms  OR all of the minterms of truth table row with a 1 “ON-set minterms” “ON-set minterms” F = m 0 + m 2 + m 5 + m 7 F = m 0 + m 2 + m 5 + m 7

11 More General: Sum of Products  Simplifying sum-of-minterms can yield a sum of products difference is that each term need not be a minterm difference is that each term need not be a minterm i.e., terms do not need to have all variables i.e., terms do not need to have all variables  Ex:  Implementation is still AND-OR but products may contain fewer literals but products may contain fewer literals simplifies to:

12 Two-Level Implementation  Sum of products has 2 levels of gates ANDs followed by an OR ANDs followed by an OR equivalently: NANDs followed by a NAND equivalently: NANDs followed by a NAND

13 More Levels of Gates?  What’s best? Hard to answer Hard to answer More gate delays (more on this later) More gate delays (more on this later) But maybe we only have 2-input gates But maybe we only have 2-input gates  So multi-input ANDs and ORs have to be decomposed

14 Complement of a Function  Definition: 1s & 0s swapped in truth table  Mechanical way to derive algebraic form Take the dual Take the dual  Recall: Interchange AND and OR, and 1s & 0s Complement each literal Complement each literal

15 Complement of F  Not surprisingly, just sum of the other minterms sum of “OFF-set minterms” sum of “OFF-set minterms”  Example: F = m 0 + m 2 + m 5 + m 7 F = m 0 + m 2 + m 5 + m 7 F’ = m 1 + m 3 + m 4 + m 6 F’ = m 1 + m 3 + m 4 + m 6 simplifies to:

16 Product of Maxterms  Recall that maxterm is true except for its own case  So M1 is only false for 001

17 Product of Maxterms  Can express F as AND of all rows that should evaluate to 0 i.e., product of OFF-set Maxterms! i.e., product of OFF-set Maxterms! why? why?  a row in which F=0 (OFF-set)…  … has a Maxterm that is 0  which makes the product 0 or

18 Complement of F  Can express F’s complement similarly: product of ON-set Maxterms! product of ON-set Maxterms! why? why?  a row in which F=1 (ON-set)…  … has a Maxterm that is 0  which makes F’ zero or

19 More General: Product of Sums  Simplifying product-of-Maxterms can yield a product of sums difference is that each term need not be a Maxterm difference is that each term need not be a Maxterm i.e., terms do not need to have all variables i.e., terms do not need to have all variables  Ex:  Implementation is still OR-AND but each sum may contain fewer literals but each sum may contain fewer literals simplifies to: HOW??  homework problem (hint: distributive property)

From Equations to Gates  Simply parse the Boolean equation and replace each operator with a gate AND, OR, NOT gates AND, OR, NOT gates parentheses indicate hierarchy parentheses indicate hierarchy  Example: 20

21Recap  Working (so far) with AND, OR, and NOT  Algebraic identities  Algebraic simplification  Minterms and maxterms  Can now synthesize gate-level implementation from truth table

Drawing Style  Indicate inputs and outputs using arrows or: inputs at left/top, outputs at right/bottom or: inputs at left/top, outputs at right/bottom  If possible, gates should flow from left to right or: top to bottom or: top to bottom  Straight wires best or: keep bends at a minimum (preferably 90 deg) or: keep bends at a minimum (preferably 90 deg)  Connections: wires always connect at a “T” junction wires always connect at a “T” junction a dot at a wire crossing indicates connection a dot at a wire crossing indicates connection wire crossing without a dot means no connection wire crossing without a dot means no connection 22

Circuit Schematic Rules (cont.) Wire connections A dot where wires cross indicates a connection A dot where wires cross indicates a connection Wires crossing without a dot make no connection Wires crossing without a dot make no connection Wires always connect at a T junction Wires always connect at a T junction 23

Multiple Output Circuits: Example Output asserted corresponding to most significant TRUE input 24 Example: Priority Encoder Hardware

Example: Priority Encoder Hardware (contd.) 25

Values that are not 0’s and 1’s Don’t Cares (X) Floating values (Z) 26

X values  X is neither 1 nor 0 typically used to represent “unknown” or “illegal” values typically used to represent “unknown” or “illegal” values  Unknown e.g., an uninitialized value in a simulator e.g., an uninitialized value in a simulator  in hardware most flipflops will wake up to a 1 or a 0 value –but could be different each time it wakes up  Don’t Care an output specified as X means “don’t care” an output specified as X means “don’t care”  i.e., left unspecified: whatever comes out is okay  Illegal e.g., contention at output e.g., contention at output  two gates fighting 27

Actually: Several Meanings of X 28  When used to specify an input value Means: “Don’t Care”: this particular input variable’s value does not matter when determining the output Means: “Don’t Care”: this particular input variable’s value does not matter when determining the output Example: Output F is 1 when the inputs A, B, C are 1X1 Example: Output F is 1 when the inputs A, B, C are 1X1  Means F = AC // B is a Don’t Care  Unknown/uninitialized signal If a simulator cannot determine the value of a signal, it will display it as X If a simulator cannot determine the value of a signal, it will display it as X Other values that depend on this signal may also become X Other values that depend on this signal may also become X  Contention (illegal input value) Sometimes a simulator will use X to denote the value of a node that is being pulled both to 0 and to 1 Sometimes a simulator will use X to denote the value of a node that is being pulled both to 0 and to 1 Example: Outputs of two gates are shorted; or a gate has p- transistor and n-transistor network simultaneously on! Example: Outputs of two gates are shorted; or a gate has p- transistor and n-transistor network simultaneously on!

Don’t Cares (X) 29 Example: Priority Encoder Hardware More compact representation!

Z values  Also neither 1 nor 0 but actually “floating” but actually “floating” i.e., the output is neither connected to 0 (ground) nor to 1 (power supply) i.e., the output is neither connected to 0 (ground) nor to 1 (power supply)  Could be undesirable: actual voltage is highly susceptible to noise actual voltage is highly susceptible to noise  e.g., neighboring wires/gates could easily influence value  Could be by design: useful in buses, memories, multiplexers, etc. useful in buses, memories, multiplexers, etc.  usually one gate drives a wire to a 1 or 0  all others “float” their outputs example: tristate buffers/inverters example: tristate buffers/inverters  cover in next lecture 30

Next  Mon next week: Combinational building blocks Combinational building blocks 31