Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture

Slides:



Advertisements
Similar presentations
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Advertisements

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.
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.
Chapter 2: Boolean Algebra and Logic Functions
Lecture 4 Logic gates and truth tables Implementing logic functions
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
ECE 331 – Digital System Design
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
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.
1 CSE370, Lecture 5 Lecture 5 u Logistics n HW1 due today n HW2 available today, due Wed 1/21 n Office Hours this week: íMe: Friday 10:00-11:00 CSE 668.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
LOGIC GATES & BOOLEAN ALGEBRA
Logic Functions: XOR, XNOR
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
Lecture 4 Introduction to Boolean Algebra. Binary Operators In the following descriptions, we will let A and B be Boolean variables and define a set of.
1 An algebraic structure consists of –a set of elements B –binary operators {+,.} –and a unary operator { ‘ } Such that following holds –Membership: B.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. De Morgan’s Theorem De Morgan’s Theorem.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
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,
Combinational Circuits and Boolean
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 12 Logistics Last lecture Today HW4 due today Timing diagrams
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
CS 105 Digital Logic Design
Digital Logic.
Lecture 9 Logistics Last lecture Today HW3 due Wednesday
Princess Sumaya University
ECE 331 – Digital System Design
Chapter 10 Combinational Circuits.
Basics Combinational Circuits Sequential Circuits
CSE 311 Foundations of Computing I
Boolean Algebra.
Lecture 14: Boolean Algebra
CSE 370 – Winter Combinational Logic - 1
Lecture 6 Logistics Last lecture Today’s lecture HW2 due on Wednesday
CSE 370 – Winter 2002 – Logic minimization - 1
Combinatorial Logic Circuit
Boolean Algebra.
Lecture 15 Logistics Last lecture Today HW4 is due today
Lecture 6 Logistics Last lecture Today’s lecture
Lecture 7 Logistics Last lecture Today HW2 due now Lab2 going on
EECS150 - Digital Design Lecture 7 - Boolean Algebra II
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
CSC 220: Computer Organization Logic Gates and Functions
CSE 311 Foundations of Computing I
Chapter 2 Introduction to Logic Circuits
Spring Combinational Logic - 1
Lecture 4 Minterm and Maxterm
Lecture 5 Logistics Last lecture Today’s lecture
Chapter #2: Two-Level Combinational Logic
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
Special Gates Combinational Logic Gates
Analysis of Logic Circuits Example 1
CSE 311: Foundations of Computing
Lecture 5 Converting to use NAND and NOR
Lecture 7 Logistics Last lecture Today HW2 due now Lab2 going on
Lecture 6 Logistics Last lecture Today’s lecture HW2 due on Wednesday
Dept of Electronics Engineering
CSE 370 – Winter Number syst.; Logic functions- 1
Boolean Algebra.
Presentation transcript:

Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture HW1 due Wednesday at start of class Office Hours: Me: 12:20-1:00 CSE 668 plus one later this week TAs: Today at 3:30, tomorrow at 12:30 & 2:30 in CSE 220 Lab2 going on this week Last lecture --- Boolean algebra Axioms Useful laws and theorems Simplifying Boolean expressions Today’s lecture Logic gates and truth tables in detail Implementing logic functions Canonical forms Class rule: Interrupt when you don’t understand why we are doing something

The “WHY” slide Logic Gates and Truth Tables Now you know 0’s and 1’s and the basic Boolean algebra, now you are ready to go back and forth between truth table, Boolean expression, and logic gates. This ability to go back and forth is an extremely useful skill designing and optimizing computer hardware. Implementing Logic Functions Now with these basic tools you learned, you can “implement” logic functions. We use Boolean algebra to implement logic functions that are used in the computers. And these logic functions are used by computer programs you write. Canonical forms There are many forms to expression one Boolean function. It is good to have one standard way. A canonical form is the standard form for Boolean expressions. It has a nice property that allows you to go back and forth between truth table/expressions/gates easily. Class rule: Interrupt when you don’t understand why we are doing something

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

Logic gates and truth tables (con’t) X Y Z 0 0 1 0 1 1 1 0 1 1 1 0 NAND NOR XOR XNOR X Z Y X Y Z 0 0 1 0 1 0 1 0 0 1 1 0 X Z Y X Y Z 0 0 0 0 1 1 1 0 1 1 1 0 X Z Y X Y Z 0 0 1 0 1 0 1 0 0 1 1 1 X Z Y

Boolean expressions logic gates Example: F = (A•B)’ + C•D Example: F = C•(A+B)’ A B F C D A B F C

Truth tables logic gates Given a truth table Write the Boolean expression Minimize the Boolean expression Draw as gates Example: 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 F = A’BC’+A’BC+AB’C+ABC = A’B(C’+C)+AC(B’+B) = A’B+AC

Example: A binary full adder 1-bit binary adder Inputs: A, B, Carry-in Outputs: Sum, Carry-out A B Cin Cout Sum Adder 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 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: A 2-bit ripple-carry adder 1-Bit Adder Cin Cout Cin Cout Cin Cout Sum1 Sum2 Overflow Sum

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

What is the optimal gate 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 number of chips and/or wire? How do we explore the tradeoffs? Logic minimization: Reduce number of gates and complexity Logic optimization: Maximize speed and/or minimize power CAD tools

Minimal set We can implement any logic function from NOT, NOR, and NAND Example: (X and Y) = not (X nand Y) In fact, we can do it with only NOR or only NAND NOT is just NAND or NOR with two identical inputs NAND and NOR are duals: Can implement one from the other X nand Y = not ((not X) nor (not Y)) X nor Y = not ((not X) nand (not Y)) X Y X nor Y 0 0 1 1 1 0 X Y X nand Y 0 0 1 1 1 0

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

Sum-of-products canonical form (SOP) Also called disjunctive normal form (DNF) Commonly called a minterm expansion minterm 001 011 101 110 111 F = A'B'C + A'BC + AB'C + ABC' + ABC 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 F' = A'B'C' + A'BC' + AB'C'

Minterms Variables appear exactly once in each minterm In true or inverted form (but not both) 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 canonical form  minimal form F(A,B,C) = A'B'C+A'BC+AB'C+ABC+ABC' = AB + C 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 short-hand notation

Product-of-sums canonical form (POS) Also called conjunctive normal form (CNF) Commonly called a maxterm expansion Maxterm (a.k.a. clause) 000 010 100 F = (A + B + C) (A + B' + C) (A' + B + C) 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 F' = (A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C)(A'+B'+C')

Maxterms Variables appears 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 F in canonical form: F(A,B,C) = M(0,2,4) = M0 • M2 • M4 = (A+B+C)(A+B'+C)(A'+B+C) canonical form  minimal form F(A,B,C) = (A+B+C)(A+B'+C)(A'+B+C) = AB + C short-hand notation

Canonical implementations of F = AB + C

Conversion between canonical forms Minterm to maxterm 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) Minterm of F to minterm of F' Use minterms that don’t appear F(A,B,C) = m(1,3,5,6,7) F'(A,B,C) = 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'(A,B,C) = M(1,3,5,6,7)

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