Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.

Slides:



Advertisements
Similar presentations
Types of Logic Circuits
Advertisements

Logical Systems Synthesis.
ECE 2110: Introduction to Digital Systems Combinational Logic Design Principles.
Chapter 2 Logic Circuits.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
Boolean Algebra and Combinational Logic
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.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 2 Combinational Logic Design.
1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
Combinational Logic 1.
Overview Part 1 – Gate Circuits and Boolean Equations
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
Chapter 2 Digital Design and Computer Architecture, 2 nd Edition Chapter 2 David Money Harris and Sarah L. Harris.
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
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.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Boolean Algebra and Reduction Techniques
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
CHAPTER 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
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.
Boolean Expressions Lecture 3 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
1 COMP541 Combinational Logic - 3 Montek Singh Jan 21, 2015.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
CEC 220 Digital Circuit Design SOP and POS forms Friday, Sept 11 CEC 220 Digital Circuit Design Slide 1 of 17.
Digital Logic.
COMP541 Combinational Logic - 3
COSC3330 Computer Architecture Lecture 2. Combinational Logic
Chapter 2 Digital Design and Computer Architecture: ARM® Edition
COMP541 Combinational Logic - II
ECE 2110: Introduction to Digital Systems
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
ECE 3110: Introduction to Digital Systems
COMP541 Combinational Logic - 3
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
Boolean Algebra.
BASIC & COMBINATIONAL LOGIC CIRCUIT
CSE 370 – Winter Combinational Logic - 1
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Boolean Algebra Introduction CSCI 240
From now on: Combinatorial Circuits:
ECE 352 Digital System Fundamentals
COMP541 Combinational Logic - II
COMP541 Combinational Logic - 3
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Lecture 2: Combinational Logic Design
Presentation transcript:

Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research

Korea Univ Introduction A logic circuit is composed of  Inputs  Outputs  Functional specification Relationship between inputs and outputs  Timing specification Delay from inputs to outputs 2

Korea Univ Circuits Nodes  Inputs: A, B, C  Outputs: Y, Z  Internal: n1 Circuit elements  E1, E2, E3 3

Korea Univ Types of Logic Circuits Combinational Logic  Outputs are determined by current values of inputs  Thus, it is memoryless Sequential Logic  Outputs are determined by previous and current values of inputs  Thus, it has memory 4

Korea Univ Rules of Combinational Composition A circuit is combinational if  Every node of the circuit is either designated as an input to the circuit or connects to exactly one output terminal of a circuit element  The circuit contains no cyclic paths Every path through the circuit visits each circuit node at most once  Every circuit element is itself combinational Select combinational logic? 5

Korea Univ Boolean Equations The functional specification of a combination logic is usually expressed as a truth table or a Boolean equation  Truth table is in a tabular form  Boolean equation is in a algebraic form Example: S = F(A, B, C in ) C out = F(A, B, C in ) 6 Truth Table Boolean equation

Korea Univ Terminology The complement of a variable A is A  A variable or its complement is called literal AND of one or more literals is called a product or implicant  Example: AB, ABC, B OR of one or more literals is called a sum  Example: A + B Order of operations  NOT has the highest precedence, followed by AND, then OR Example: Y = A + BC 7

Korea Univ Minterms 8 A minterm is a product (AND) of literals involving all of the inputs to the function Each row in a truth table has a minterm that is true for that row (and only that row)

Korea Univ Sum-of-Products (SOP) Form The function is formed by ORing the minterms for which the output is true  Thus, a sum (OR) of products (AND terms) All Boolean equations can be written in SOP form 9 Y = F(A, B) = AB + AB

Korea Univ Maxterms A maxterm is a sum (OR) of literals involving all of the inputs to the function Each row in a truth table has a maxterm that is false for that row (and only that row) 10

Korea Univ Product-of-Sums (POS) Form The function is formed by ANDing the maxterms for which the output is FALSE  Thus, a product (AND) of sums (OR terms) All Boolean equations can be written in POS form 11 Y = F(A, B) = (A + B)(A + B)

Korea Univ Boolean Equation Example You are going to the cafeteria for lunch  You won’t eat lunch (E: eat) If it’s not open (O: open) If they only serve corndogs (C: corndogs) Write a truth table and boolean equations (in SOP and POS) for determining if you will eat lunch (E) SOP (sum-of-products) 2. POS (product-of-sums) E = OC E = (O + C)(O + C)(O + C)

Korea Univ When to Use SOP and POS? SOP produces the shortest equations when the output is true on only a few rows of a truth table POS is simpler when the output is false on only a few rows of a truth table 13

Korea Univ Boolean Algebra We just learned how to write a boolean equation given a truth table  But, that expression does not necessarily lead to the simplest set of logic gates One way to simplify boolean equations is to use boolean algebra  Set of axioms and theorems  It is like regular algebra, but in some cases simpler because variables can have only two values (1 or 0)  Axioms and theorems obey the principles of duality: ANDs and ORs interchanged, 0’s and 1’s interchanged 14

Korea Univ Boolean Axioms Axioms are not provable 15

Korea Univ Boolean Theorems of One Variable The prime (’) symbol denotes the dual of a statement 16

Korea Univ Boolean Theorems of One Variable T1: Identity Theorem  B 1 = B  B + 0 = B T2: Null Element Theorem  B 0 = 0  B + 1 = 1 17

Korea Univ Boolean Theorems of One Variable Idempotency Theorem  B B = B  B + B = B T4: Identity Theorem  B = B T5: Complement Theorem  B B = 0  B + B = 1 18

Korea Univ Boolean Theorems of Several Variables 19 Super-important!

Korea Univ Proof of Consensus Theorem Prove the consensus theorem 20

Korea Univ Simplifying Boolean Expressions: Example 1 Y = AB + AB = B (A + A) T8 = B (1) T5’ = B T1 21

Korea Univ Simplifying Boolean Expressions: Example 2 Y = A (AB + ABC) = A (AB (1 + C))T8 = A (AB (1))T2’ = A (AB)T1 = (AA)BT7 = ABT3 22

Korea Univ DeMorgan’s Theorem Powerful theorem in digital design Y = AB = A + B Y = A + B = A B 23

Korea Univ Bubble Pushing Pushing bubbles backward (from the output) or forward (from the inputs) changes the body of the gate from AND to OR or vice versa Pushing a bubble from the output back to the inputs puts bubbles on all gate inputs 24 Pushing bubbles on all gate inputs forward toward the output puts a bubble on the output and changes the gate body

Korea Univ Bubble Pushing What is the Boolean expression for this circuit? 25 Y = AB + CD

Korea Univ Bubble Pushing Rules Begin at the output of the circuit and work toward the inputs Push any bubbles on the final output back toward the inputs Working backward, draw each gate in a form so that bubbles cancel 26

Korea Univ From Logic to Gates 27 Schematic  A diagram of a digital circuit showing the elements and the wires that connect them together  Example: Y = ABC + ABC + ABC Any Boolean equation in the SOP form can be drawn like above

Korea Univ Circuit Schematic Rules Inputs are on the left (or top) side of a schematic Outputs are on the right (or bottom) side of a schematic Whenever possible, gates should flow from left to right Straight wires are better to use than wires with multiple corners 28

Korea Univ Circuit Schematic Rules (cont.) Wires always connect at a T junction A dot where wires cross indicates a connection between the wires Wires crossing without a dot make no connection 29

Korea Univ Multiple Output Circuits 30

Korea Univ Priority Circuit Logic 31 Probably you want to write boolean equations for Y3, Y2, Y1, Y0 in terms of SOP or POS and minimize the logic But in this case it is not that difficult to come up with simplified boolean equations by inspection Y 3 = A 3 Y 2 = A 3 A 2 Y 1 = A 3 A 2 A 1 Y 0 = A 3 A 2 A 1 A 0

Korea Univ Don’t Cares (X) 32 Y 3 = A 3 Y 2 = A 3 A 2 Y 1 = A 3 A 2 A 1 Y 0 = A 3 A 2 A 1 A 0

Korea Univ Contention: X Contention: circuit tries to drive the output to 1 and 0  So, you should not design a digital logic creating a contention! 33 Note In truth table, the symbol “X” denotes “don’t care” In circuit, the same symbol “X” denotes “unknown or illegal value”

Korea Univ Floating: Z Output is disconnected from the input if not enabled  We say output is floating, high impedance, open, or high Z 34 Tristate Buffer An implementation Example

Korea Univ Where Is Tristate Buffer Used for? Tristate buffer is used when designing hardware components sharing a communication medium called “shared bus”  Many hardware components can be attached on a shared bus  Only one component is allowed to drive the bus at a time The other components put their outputs to the floating What happen if you don’t use the tristate buffer on shared bus? 35 Hardware Device 0 Hardware Device 1 Hardware Device 2 Hardware Device 3 Hardware Device 4 Hardware Device 5 shared bus