January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logical Systems Synthesis.
Chapter 2 Logic 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.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
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
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
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.
Combinational Logic 1.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
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.
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 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Module –I Switching Function
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
Lecture 18: Boolean Algebra Boolean Functions. w = Chris is allowed to watch television x = Chris's homework is finished y = it is a school night z =
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
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 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.
CHAPTER 2 Boolean algebra and Logic gates
Hoda Roodaki Boolean Algebra Hoda Roodaki
Boolean Algebra & Logic Gates
CHAPTER 3 Simplification of Boolean Functions
Lecture 3: Incompletely Specified Functions and K Maps
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
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
Complement of a Function
Princess Sumaya University
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Boolean Algebra.
Lecture 3: Incompletely Specified Functions and K Maps
Boolean Algebra.
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
BASIC & COMBINATIONAL LOGIC CIRCUIT
ECE 331 – Digital System Design
CSE 370 – Winter Combinational Logic - 1
CSE 370 – Winter 2002 – Logic minimization - 1
Combinatorial Logic Circuit
CSE 311 Foundations of Computing I
Chapter 2 Introduction to Logic Circuits
Spring Combinational Logic - 1
Lecture 5 Logistics Last lecture Today’s lecture
Chapter #2: Two-Level Combinational Logic
Logic Circuits I Lecture 3.
CSE 311: Foundations of Computing
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
CSE 370 – Winter Number syst.; Logic functions- 1
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
Lecture 2: Combinational Logic Design
Presentation transcript:

CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 3 January 19 W’05 Yutao He yutao@cs.ucla.edu 4532B Boelter Hall http://courseweb.seas.ucla.edu/classView.php?term=05W&srs=187154200 CSM51A/EEM16-Sec.1 W’05 Y. He @ 12/9/2018

Outline Administrative Matters Recap: Data presentation Chapter 2.4-2.5, App. A Switching Function Switching Expression Switching (Boolean) Algebra Canonical Forms Summary

Administrative Matter HW #2 is posted HW #1 Solution is posted Quiz #1 will be held on Friday About Lecture note posting

Review - Data Representation Encode with binary number 0s and 1s Character ASCII Unicode Number (positive integer) Positional Number Systems Context is very important! What’s the output? int a = 12; printf (“a is %d”, a); What if char a = ‘2’; printf (“a is %d”, a); How about int a = 12; printf (“a is %x”, a);

Review - Code for Decimal Numbers Binary-Coded-Decimal (BCD) Code: Encode each decimal digit individually using binary codes Example: Encode decimal number sixteen (16): Binary Code: 10000 BCD Code: 0001 0110

Binary-Level Specification High-Level Spec FH XH YH Binary-Level Spec FB n m xB yB Encoding Decoding

Truth Table Tabular representation of switching functions x y f x y f 0 0 0 0 1 1 1 0 0 1 1 1 i 1 2 3 There are 2^n rows for a n-input switching function

2-D Truth Table

Truth Table of 1-Input S. F. x f X f f f f 0 0 0 1 1 1 0 1 0 1 i 1 2 3 0-Constant Identity (Buffer) Complement (NOT) 1-Constant

Truth Table of 2-Input S. F. x y f x y 16 possible functions (f0–f15) 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 AND OR XOR NOR EQU NAND How many different switching functions can be obtained from a n-input switching function? 2 n

Incompletely Specified S. F. Output value is not specified for a given input combination: Don’t care

One/Zero Set Notations One/Zero/D.C. Set Notations: f (x,y,z) = one-set(1,4,7), d.c.-set(3,6) or f(x,y,z) = zero-set(0,2,5), d.c.-set(3,6)

Switching (Boolean) Algebra Symbols: 0, 1 • is logic AND, + is logic OR, ‘ is logic NOT It holds all algebra axioms: 1. 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

Switching Expressions Any switching function that can be expressed as a truth table can be written as an expression in Boolean algebra using operators: ', +, and •, i.e. Switching Expressions. X Y X • Y 0 0 0 0 1 0 1 0 0 1 1 1 X Y X' X' • Y 0 0 1 0 0 1 1 1 1 0 0 0 1 1 0 0 X Y X' Y' X • Y X' • Y' ( X • Y ) + ( X' • Y' ) 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1

S. F and Logic Gates NOT X' X ~X AND X • Y XY X  Y OR X + Y X  Y X Y Z 0 0 0 0 1 0 1 0 0 1 1 1 X Y Z X Y Z 0 0 0 0 1 1 1 0 1 1 1 1 X Z Y

X xor Y = X Y' + X' Y X or Y but not both ("inequality", "difference") Logic Gates (Cont.) X Y Z 0 0 1 0 1 1 1 0 1 1 1 0 NAND NOR XOR X Y 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 xor Y = X Y' + X' Y X or Y but not both ("inequality", "difference") X Z Y X Y Z 0 0 1 0 1 0 1 0 0 1 1 1 X xnor Y = X Y + X' Y' X and Y are the same ("equality", "coincidence") X Z Y

Universal sets Can we implement all switching functions from NOT, NOR, and NAND? Univerval sets: {NOT, AND, OR} {NOR} {NAND}

Axioms of Boolean Algebra Identity 1. X + 0 = X 1D. X • 1 = X Null 2. X + 1 = 1 2D. X • 0 = 0 Idempotency: 3. X + X = X 3D. X • X = X Involution: 4. (X')' = X Complementarity: 5. X + X' = 1 5D. X • X' = 0 Commutativity: 6. X + Y = Y + X 6D. X • Y = Y • X Associativity: 7. (X + Y) + Z = X + (Y + Z) 7D. (X • Y) • Z = X • (Y • Z)

Axioms of Boolean Algebra (Cont.) Distributivity: 8. X • (Y + Z) = (X • Y) + (X • Z) 8D. X + (Y • Z) = (X + Y) • (X + Z) Uniting: 9. X • Y + X • Y' = X 9D. (X + Y) • (X + Y') = X Absorption: 10. X + X • Y = X 10D. X • (X + Y) = X 11. (X + Y') • Y = X • Y 11D. (X • Y') + Y = X + Y Factoring: 12. (X + Y) • (X' + Z) = 12D. X • Y + X' • Z = X • Z + X' • Y (X + Z) • (X' + Y) Concensus: 13. (X • Y) + (Y • Z) + (X' • Z) = 13D. (X + Y) • (Y + Z) • (X' + Z) = X • Y + X' • Z (X + Y) • (X' + Z)

De Morgan’s Law de Morgan's Law: 14. (X + Y )' = X' • Y' 14D. (X • Y )' = X' + Y' establishes relationship between • and + also called “bubble logic” X y X y

Equivalent Switching Expressions Two switching expressions are equivalent if they represent the same switching function: Have the same number of inputs variables Output is same for all combinations of input values Example:

Equivalence Proof Show that E1 and E2 are equivalent: E1 = bc+cb’+ac E2 = c Show that a+a’b = a+b Show that xyz+x’y+xyz’ = y

Canonical Forms Truth table is the unique signature of a switching function Many alternative switching expressions may have the same truth table - equivalence Canonical forms Standard forms for a switching expression Provides a unique algebraic signature

Sum Of Products (S.O.P.) Also known as sum of minterms Corresponding to two-level AND-OR networks F = 001 011 101 110 111 + ABC A'B'C + ABC' + A'BC + AB'C 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'

Sum Of Products (Cont.) Minterm ANDed product of literals – input combination for which output is true Each variable appears exactly once, 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' = (A'B' + A'B + AB' + AB)C + ABC' = ((A' + A)(B' + B))C + ABC' = C + ABC' = ABC' + C = 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 m-Notation short-hand notation for minterms of 3 variables

Product of Sums Also known as product of maxterm Corresponds to two-level OR-AND networks 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')

Product of Sums (Cont.) 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) M-Notation short-hand notation for maxterms of 3 variables

Canonical form conversions Minterm to maxterm conversion Use maxterms whose indices do not appear in minterm expansion e.g., F(A,B,C) = m(1,3,5,6,7) = M(0,2,4) Maxterm to minterm conversion Use minterms whose indices do not appear in maxterm expansion e.g., F(A,B,C) = M(0,2,4) = m(1,3,5,6,7) Minterm expansion of F to minterm expansion of F' Use minterms whose indices do not appear e.g., F(A,B,C) = m(1,3,5,6,7) F'(A,B,C) = m(0,2,4) Maxterm expansion of F to maxterm expansion of F' Use maxterms whose indices do not appear e.g., F(A,B,C) = M(0,2,4) F'(A,B,C) = M(1,3,5,6,7)

An Example: Binary coded decimal increment by 1 BCD digits encode decimal digits 0 – 9 in bit patterns 0000 – 1001 A B C D W X Y Z 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 X X X X 1 0 1 1 X X X X 1 1 0 0 X X X X 1 1 0 1 X X X X 1 1 1 0 X X X X 1 1 1 1 X X X X 0-set of W 1-set of W don't care (DC) set of W these inputs patterns should never be encountered in practice – "don't care" about associated output values, can be exploited in minimization

An Example - Cont. Canonical representations of the BCD increment by 1 function: Z = m0 + m2 + m4 + m6 + m8 + d10 + d11 + d12 + d13 + d14 + d15 Z =  [ m(0,2,4,6,8) + d.c.(10,11,12,13,14,15) ] Z = M1 • M3 • M5 • M7 • M9 • D10 • D11 • D12 • D13 • D14 • D15 Z =  [ M(1,3,5,7,9) • D.C.(10,11,12,13,14,15) ]

Summary Truth tables and switching functions NOT, AND, OR, NAND, NOR, XOR Axioms and theorems of Boolean algebra Proofs by re-writing Canonical forms SOP, POS, m/M-notation, 1/0/dc-sets Expression equivalence Incompletely specified Functions

Next Lecture Chapter 3 – Combinational IC’s