CSE 370 – Winter Combinational Logic - 1

Slides:



Advertisements
Similar presentations
Logical Systems Synthesis.
Advertisements

Chapter 2 Logic Circuits.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
EECS Components and Design Techniques for Digital Systems Lec 05 – Boolean Logic 9/4-04 David Culler Electrical Engineering and Computer Sciences.
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Chapter 2: Boolean Algebra and Logic Functions
CHAPTER 2 Boolean Algebra
Lecture 4 Logic gates and truth tables Implementing logic functions
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
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.
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
CSE 311 Foundations of Computing I
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 CSE370, Lecture 3 Lecture 3: Boolean Algebra u Logistics u Last lecture --- Numbers n Binary numbers n Base conversion n Number systems for negative.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
1 An algebraic structure consists of –a set of elements B –binary operators {+,.} –and a unary operator { ‘ } Such that following holds –Membership: B.
CSE 311 Foundations of Computing I Lecture 4, Boolean Logic Autumn 2011 CSE 3111.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Boolean Algebra & Logic Gates
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
© Copyright 2004, Gaetano Borriello and Randy H. Katz
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
CHAPTER 2 Boolean Algebra
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Princess Sumaya University
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
Jeremy R. Johnson Wed. Sept. 29, 1999
ECE 331 – Digital System Design
Lecture 3: Boolean Algebra
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
CSE 311 Foundations of Computing I
Boolean Algebra.
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter 2002 – Logic minimization - 1
Combinatorial Logic Circuit
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
February 7, 2002 John Wawrzynek
Boolean Algebra Introduction CSCI 240
CSE 311 Foundations of Computing I
COMP541 Combinational Logic - II
Chapter 2 Introduction to Logic Circuits
Spring Combinational Logic - 1
Lecture 5 Logistics Last lecture Today’s lecture
COMS 361 Computer Organization
Chapter #2: Two-Level Combinational Logic
Lecture 3: Boolean Algebra
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
Boolean Algebra Rayat Shikshan Sanstha’s
Boolean Algebra Rayat Shikshan Sanstha’s
CSE 311: Foundations of Computing
Lecture 3: Boolean Algebra
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
CSE 370 – Winter Number syst.; Logic functions- 1
Lecture 2: Combinational Logic Design
Presentation transcript:

CSE 370 – Winter 2002 - Combinational Logic - 1 Overview Last lecture Number systems: 2’s complement Combinational logic Logic functions and truth tables Boolean algebra: definition Today Laws and theorems of Boolean algebra Canonical forms CSE 370 – Winter 2002 - Combinational Logic - 1

The Mathematics: Boolean algebra (review) A Boolean algebra is an algebraic structure that consists of a set of elements B; B = {0, 1} binary operations { + , • }; + is logical OR, • is logical AND and a unary operation { ' }; ' is logical NOT such that the following axioms (laws) hold: 1. the set B contains at least two elements, a, b, such that a  b 2. closure: a + b is in B a • b is in B 3. commutativity: a + b = b + a a • b = b • a 4. associativity: a + (b + c) = (a + b) + c a • (b • c) = (a • b) • c 5. identity: a + 0 = a a • 1 = a 6. distributivity: a + (b • c) = (a + b) • (a + c) a • (b + c) = (a • b) + (a • c) 7. complementarity: a + a' = 1 a • a' = 0 CSE 370 – Winter 2002 - Combinational Logic - 2

Logic simplification using Boolean axioms Use Boolean algebra axioms to convert logical expressions to forms better suited for hardware Two key concepts: Duality (a meta-theorem, i.e., a theorem about theorems) All Boolean expressions have logical duals any theorem that can be proven is thus also proven for its dual! Replace • by +, + by •, 0 by 1, and 1 by 0, and leave literals unchanged DeMorgan’s theorem Procedure for complementing Boolean functions Replace • by +, + by •, 0 by 1, and 1 by 0 Replace all literals with their complements CSE 370 – Winter 2002 - Combinational Logic - 3

Useful laws (Axioms) and theorems Identity a + 0 = a a • 1 = a Null a + 1 = 1 a • 0 = 0 Idempotent a + a = a a • a = a Involution (a’)’ = a Complementarity a + a' = 1 a • a' = 0 Commutativity a + b = b + a a • b = b • a Associativity a + (b + c) = (a + b) + c a • (b • c) = (a • b) • c Distributivity a + (b • c) = (a + b) • (a + c) a • (b + c) = (a • b) + (a • c) Uniting a • b + a • b’ = a (a+b) • (a + b’) = a Absorbtion a + a • b = a a • (a + b) = a Absorbtion # 2 (a + b’) • b = a • b (a • b’)+ b = a+ b CSE 370 – Winter 2002 - Combinational Logic - 4

deMorgan’s law and some more useful ones de Morgan's (a + b + ...)' = a' • b' • ... (a • b • ...)' = a' + b' + ... generalized de Morgan's: f'(X1,X2,...,Xn,0,1,+,•) = f(X1',X2',...,Xn',1,0,•,+) establishes relationship between • and + Duality (a+b+c+ …)D = (a • b • c • …) (a • b • c •… …)D = (a+b+c+..) Generalized duality {f(X1,X2,...,Xn,0,1,+,•) } D = f(X1,X2,...,Xn,1,0,•,+) Factoring (a+b) •(a’+c) = a •c + a’•b (a •b)+(a’ •c) = (a+c) •(a’+b) Consensus a • b + b • c + a’ • c = a • b + a’ • c (a+b) •(b+c) •(a’+c) = (a+b) •(a’+c) CSE 370 – Winter 2002 - Combinational Logic - 5

Proving theorems (rewriting) Using the axioms of Boolean algebra: e.g., prove the theorem: X • Y + X • Y' = X e.g., prove the theorem: X + X • Y = X distributivity (8) X • Y + X • Y' = X • (Y + Y') complementarity (5) X • (Y + Y') = X • (1) identity (1D) X • (1) = X  identity (1D) X + X • Y = X • 1 + X • Y distributivity (8) X • 1 + X • Y = X • (1 + Y) identity (2) X • (1 + Y) = X • (1) identity (1D) X • (1) = X  CSE 370 – Winter 2002 - Combinational Logic - 6

Proving theorems (perfect induction) Using perfect induction (complete truth table): e.g., de Morgan's: X Y X' Y' (X + Y)' X' • Y' 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 0 (X + Y)' = X' • Y' NOR is equivalent to AND with inputs complemented 1 1 X Y X' Y' (X • Y)' X' + Y' 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 0 (X • Y)' = X' + Y' NAND is equivalent to OR with inputs complemented 1 1 CSE 370 – Winter 2002 - Combinational Logic - 7

CSE 370 – Winter 2002 - Combinational Logic - 8 A simple example 1-bit binary adder inputs: A, B, Carry-in outputs: Sum, Carry-out A B Cin Cout S A B Cin S Cout 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 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 CSE 370 – Winter 2002 - Combinational Logic - 8

Apply the theorems to simplify expressions The theorems of Boolean algebra can simplify Boolean expressions e.g., full adder's carry-out function (same rules apply to any function) 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 B Cin + A B' Cin + A B Cin' + A B Cin = (A' + A) B Cin + A B' Cin + A B Cin' + A B Cin = (1) B Cin + A B' Cin + A B Cin' + A B Cin = B Cin + A B' Cin + A B Cin' + A B Cin + A B Cin = B Cin + A B' Cin + A B Cin + A B Cin' + A B Cin = B Cin + A (B' + B) Cin + A B Cin' + A B Cin = B Cin + A (1) Cin + A B Cin' + A B Cin = B Cin + A Cin + A B (Cin' + Cin) = B Cin + A Cin + A B (1) = B Cin + A Cin + A B (Note: a few steps have been skipped) CSE 370 – Winter 2002 - Combinational Logic - 9

Waveform view of logic functions Just a sideways truth table but note how edges don't line up exactly it takes time for a gate to switch its output! time change in Y takes time to "propagate" through gates CSE 370 – Winter 2002 - Combinational Logic - 10

Implementing Boolean functions Technology independent canonical forms two-level forms multi-level forms Technology choices packages of a few gates regular logic two-level programmable logic multi-level programmable logic CSE 370 – Winter 2002 - Combinational Logic - 11

CSE 370 – Winter 2002 - Combinational Logic - 12 Canonical forms Truth table is the unique signature of a Boolean function Many alternative gate realizations may have the same truth table Canonical forms standard forms for a Boolean expression provides a unique algebraic signature CSE 370 – Winter 2002 - Combinational Logic - 12

Sum-of-products canonical forms Also known as disjunctive normal form Also known as minterm expansion F = 001 011 101 110 111 + ABC' + ABC A'B'C + AB'C + A'BC F = 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' CSE 370 – Winter 2002 - Combinational Logic - 13

Product-of-sums canonical form Also known as conjunctive normal form Also known as maxterm expansion F = 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') CSE 370 – Winter 2002 - Combinational Logic - 14

Product-of-sums canonical form (cont’d) Sum term (or maxterm) ORed sum of literals – input combination for which output is false each variable appears exactly once, 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) = (A + B + C) (A + B' + C) (A + B + C) (A' + B + C) = (A + C) (B + C) short-hand notation for maxterms of 3 variables CSE 370 – Winter 2002 - Combinational Logic - 15

S-o-P, P-o-S, and de Morgan’s theorem Sum-of-products F' = A'B'C' + A'BC' + AB'C' Apply de Morgan's (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') (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 CSE 370 – Winter 2002 - Combinational Logic - 16

Four alternative two-level implementations of F = AB + C canonical sum-of-products minimized sum-of-products canonical product-of-sums minimized product-of-sums B F1 C F2 F3 F4 CSE 370 – Winter 2002 - Combinational Logic - 17