Lecture 4 Logic gates and truth tables Implementing logic functions

Slides:



Advertisements
Similar presentations
Chapter 2 Logic Circuits.
Advertisements

II - Combinational Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Combinational logic Basic logic  Boolean algebra, proofs by re-writing,
Combinational Logic Circuits Is the logic circuit where the output always depends on the inputs irrespective of the previous state with out the feed back.
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
ENGIN112 L8: Minimization with Karnaugh Maps September 19, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 8 Minimization with Karnaugh.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.
EECS Components and Design Techniques for Digital Systems Lec 05 – Boolean Logic 9/4-04 David Culler Electrical Engineering and Computer Sciences.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
CK Cheng Tuesday 10/2/02 CS 140 Lecture 2. Part I. Combinational Logic I) Specification –a. Language –b. Truth Table –c. Boolean Algebra –d. Incompletely.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Canonical Forms and Logic Miniminization
CS 151 Digital Systems Design Lecture 8 Minimization with Karnaugh Maps.
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
AOI Logic Implementation
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
Chapter 2: Boolean Algebra and Logic Functions
Overview of Chapter 3 °K-maps: an alternate approach to representing Boolean functions °K-map representation can be used to minimize Boolean functions.
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.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
ECE 331 – Digital System Design
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Foundations of Computing I CSE 311 Fall bit Binary Adder Inputs: A, B, Carry-in Outputs: Sum, Carry-out A B Cin Cout S
CSE 311 Foundations of Computing I Lecture 5, Boolean Logic and Predicates Autumn 2012 CSE 3111.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
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
LOGIC GATES & BOOLEAN ALGEBRA
1 Chapter 2 Combinational logic. 2 Combinational logic Basic logic  Boolean algebra, proofs by re-writing, proofs by perfect induction  logic functions,
Venn Diagram – the visual aid in verifying theorems and properties 1 E.
Boolean Algebra AND gate A B | AB 0 0 | | | | 1 OR gate A B | A + B 0 0 | | | | 1 NOT gate _ A | A or A’ 0 | 1 1 |
Test Slide SAT MCAT GRE. CSE 370 Spring 2006 Introduction to Digital Design Lecture 5: Canonical Forms Last Lecture Logic Gates Different Implementations.
CSE 311 Foundations of Computing I
Chap 2. Combinational Logic Circuits
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
ECE2030 Introduction to Computer Engineering Lecture 6: Canonical (Standard) Forms Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
1/16/ CSEE, UQ Lecture 3 Hardware Description Methods, Review of Switching Algebra.
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
C.S. Choy21 BOOLEAN ALGEGRA The Mathematics of logic Boolean variables have only two possible values (binary) Operators:. Product+ SumComplement A.B A+B.
1 An algebraic structure consists of –a set of elements B –binary operators {+,.} –and a unary operator { ‘ } Such that following holds –Membership: B.
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
CSE 311 Foundations of Computing I Lecture 4, Boolean Logic Autumn 2011 CSE 3111.
1 CSE370, Lecture 4 Lecture 4 u Logistics n HW1 due now n HW2 posted now and is due one week from today n Lab1 going on this week n Feedback on lectures,
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Boolean Algebra.
CSE 370 – Winter Combinational Logic - 1
Combinatorial Logic Circuit
EECS150 - Digital Design Lecture 7 - Boolean Algebra II
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
CSE 311 Foundations of Computing I
Chapter 2 Introduction to Logic Circuits
Lecture 4 Minterm and Maxterm
Lecture 5 Logistics Last lecture Today’s lecture
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
Special Gates Combinational Logic Gates
CSE 311: Foundations of Computing
Presentation transcript:

Lecture 4 Logic gates and truth tables Implementing logic functions Canonical forms Sum-of-products Product-of-sums

Logic gates and truth tables X Y Z 0 0 0 0 1 0 1 0 0 1 1 1 AND X•Y XY OR X + Y NOT X' X X Y Z X Y Z 0 0 0 0 1 1 1 0 1 1 1 1 X Y Z _ X Y 0 1 1 0 X Y

Logic gates and truth tables NAND NOR X Y Z 0 0 1 0 1 1 1 0 1 1 1 0 X Y Z X Y Z 0 0 1 0 1 0 1 0 0 1 1 0 Z X Y

Logic gates and truth tables XOR XNOR X Y Z 0 0 0 0 1 1 1 0 1 1 1 0 X Y Z X Y Z 0 0 1 0 1 0 1 0 0 1 1 1 Z X Y

Realizing Boolean formulas F = (A•B)’ + C•D F = C•(A+B)’ F A B C D A B C F

Realizing truth tables Given a truth table Write the Boolean expression Minimize the Boolean expression Draw as gates

Example F = A’BC’+A’BC+AB’C+ABC = A’B(C’+C)+AC(B’+B) = A’B+AC A B C F 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1

Example: Binary full adder Cin Cout Sum Adder 1-bit binary adder Inputs: A, B, Carry-in Outputs: Sum, Carry-out A B Cin Cout Sum 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 Sum = A'B'Cin + A'BCin' + AB'Cin' + ABCin Cout = A'BCin + AB'Cin + ABCin' + ABCin Both Sum and Cout can be minimized.

Full adder: Sum Before Boolean minimization Sum = A'B'Cin + A'BCin' After Boolean minimization Sum = (AB)  Cin

Full adder: Carry-out Before Boolean minimization Cout = A'BCin + AB'Cin + ABCin' + ABCin After Boolean minimization Cout = BCin + ACin + AB

Preview: 2-bit ripple-carry adder Sum Cout Cin B 1-Bit Adder A1 B1 Cout Cin Sum1 A2 B2 Sum2 Overflow

Many possible mappings Many ways to map expressions to gates Example: Z = A·B·(C+D) = A·(B·(C+D)) _ _ _ _

What is the optimal realization? We use the axioms and theorems of Boolean algebra to “optimize” our designs Design goals vary Reduce the number of gates? Reduce the number of gate inputs? Reduce the number of cascaded levels of gates?

What is the optimal realization? How do we explore the tradeoffs? Logic minimization: Reduce number of gates and complexity Logic optimization: Maximize speed and/or minimize power CAD tools

Canonical forms Canonical forms Two canonical forms Standard forms for Boolean expressions Derived from truth table Generally not the simplest forms (can be minimized) Two canonical forms Sum-of-products (minterms) Product-of-sums (maxterms)

Sum-of-products (SOP) Also called disjunctive normal form (DNF) or minterm expansion A B C F F' 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 0 001 011 101 110 111 F = A'B'C + A'BC + AB'C + ABC' + ABC F' = A'B'C' + A'BC' + AB'C' minterm

Minterms Variables appear exactly once in each minterm in true or inverted form (but not both) short-hand notation A B C minterms 0 0 0 A'B'C' m0 0 0 1 A'B'C m1 0 1 0 A'BC' m2 0 1 1 A'BC m3 1 0 0 AB'C' m4 1 0 1 AB'C m5 1 1 0 ABC' m6 1 1 1 ABC m7 F in canonical form: F(A,B,C) = m(1,3,5,6,7) = m1 + m3 + m5 + m6 + m7 = A'B'C+A'BC+AB'C+ABC'+ABC

Product-of-sums (POS) Also called conjunctive normal form (CNF) or maxterm expansion A B C F F' 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 0 000 010 100 F = (A + B + C) (A + B' + C) (A' + B + C) F' = (A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C)(A'+B'+C') maxterm

Maxterms Variables appear exactly once in each maxterm in true or inverted form (but not both) A B C maxterms 0 0 0 A+B+C M0 0 0 1 A+B+C' M1 0 1 0 A+B'+C M2 0 1 1 A+B'+C' M3 1 0 0 A'+B+C M4 1 0 1 A'+B+C' M5 1 1 0 A'+B'+C M6 1 1 1 A'+B'+C' M7 short-hand notation F in canonical form: F(A,B,C) = M(0,2,4) = M0 • M2 • M4 = (A+B+C)(A+B'+C)(A'+B+C)

Example: F = AB+C

From SOP to POS and back Minterm to maxterm Maxterm to minterm Use maxterms that aren’t in minterm expansion F(A,B,C) = m(1,3,5,6,7) = M(0,2,4) Maxterm to minterm Use minterms that aren’t in maxterm expansion F(A,B,C) = M(0,2,4) = m(1,3,5,6,7)

From SOP to POS and back Minterm of F to minterm of F' Use minterms that don’t appear F(A,B,C) = m(1,3,5,6,7) F' = m(0,2,4) Maxterm of F to maxterm of F' Use maxterms that don’t appear F(A,B,C) = M(0,2,4) F' = M(1,3,5,6,7)

SOP, POS, and DeMorgan's Sum-of-products Apply DeMorgan's to get POS F' = A'B'C' + A'BC' + AB'C' Apply DeMorgan's to get POS (F')' = (A'B'C' + A'BC' + AB'C')' F = (A+B+C)(A+B'+C)(A'+B+C)

SOP, POS, and DeMorgan's Product-of-sums Apply DeMorgan's to get SOP F' = (A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C') Apply DeMorgan's to get SOP (F')' = ((A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C'))' F = A'B'C + A'BC + AB'C + ABC