EE345 - Micro-Controllers Boolean Algebra and Logic Gates Prof. Ahmad Abu-El-Haija.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Boolean Algebra and Logic Gates
Logical Systems Synthesis.
Chapter 2 Logic Circuits.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 4 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
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.
Boolean Algebra and Logic Gates
1 Chapter 2 Boolean Algebra and Logic Gates The most common postulates ( 假設 ; 基本條件 ) used to formulate various algebraic structures are: 1. Closure ( 封閉性.
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 Two Boolean Algebra and Logic Gate
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra. Binary Logic and Gates Binary variables take on one of two values. Logical operators operate on binary values and binary variables. Basic.
Mantıksal Tasarım – BBM231 M. Önder Efe
Computer Organization
Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
2-6 Other Logic Operations For two variables one can achieve sixteen operations Only eight are useful for computers Boolean algebra built on AND, OR and.
1 Why study Boolean Algebra? 4 It is highly desirable to find the simplest circuit implementation (logic) with the smallest number of gates or wires. We.
Boolean Algebra and Logic Gates CE 40 B 18 June 2003.
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
Binary Logic and Gates Binary variables take on one of two values.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Chapter 2 Boolean Algebra and Logic Gates 授課教師 : 張傳育 博士 (Chuan-Yu Chang Ph.D.) Tel: (05) ext.
Boolean Algebra and Digital Circuits
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
Combinational Logic 1.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
Logic Design Dr. Yosry A. Azzam.
Overview Part 1 – Gate Circuits and Boolean Equations
Digital System Ch2-1 Chapter 2 Boolean Algebra and Logic Gates Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.
LOGIC GATES & BOOLEAN ALGEBRA
Boolean Algebra and Logic Gates
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 2 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
D IGITAL L OGIC D ESIGN I B OOLEAN A LGEBRA AND L OGIC G ATE 1.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Boolean Algebra and Logic Gates
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 =
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.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Standard & Canonical Forms COE 202 Digital Logic Design Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University of Petroleum.
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.
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.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
CHAPTER 2 Boolean algebra and Logic gates
ECE 301 – Digital Electronics
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
Complement of a Function
Princess Sumaya University
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
17-Nov-18 Logic Algebra 1 Combinational logic.
Boolean Algebra.
INTRODUCTION TO LOGIC DESIGN Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra.
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
Boolean Algebra Introduction CSCI 240
Presentation transcript:

EE345 - Micro-Controllers Boolean Algebra and Logic Gates Prof. Ahmad Abu-El-Haija

March 5, 2016Digital System Design2 Acknowledgement This presentation is a modified version of lecture notes prepared by Dr. Pradondet Nilagupta, Kasetsart University. The latter is also a modified version based upon presentations by Prof. Maciej Ciesielski and Prof. Tilman Wolf, University of Massachusetts Amherst, and original slides from the publisher.

March 5, 2016EE345 – Micro-Controllers3 Algebras What is an Algebra?  Mathematical system consisting of Set of elements Set of operators Axioms or postulates Why is it important?  Defines rules of “calculations” Example: arithmetic on natural numbers  Set of elements: N = {1,2,3,4,…}  Operator: +, –, *  Axioms: associativity, distributivity, closure, identity elements, etc. Note: operators with two inputs are called binary  Does not mean they are restricted to binary numbers!  Operator(s) with one input are called unary

March 5, 2016EE345 – Micro-Controllers4 George Boole Father of Boolean algebra He came up with a type of linguistic algebra, the three most basic operations of which were (and still are) AND, OR and NOT. It was these three functions that formed the basis of his premise, and were the only operations necessary to perform comparisons or basic mathematical functions. Boole’s system (detailed in his 'An Investigation of the Laws of Thought, on Which Are Founded the Mathematical Theories of Logic and Probabilities', 1854) was based on a binary approach, processing only two objects - the yes-no, true-false, on-off, zero-one approach. Surprisingly, given his standing in the academic community, Boole's idea was either criticized or completely ignored by the majority of his peers. Eventually, one bright student, Claude Shannon ( ), picked up the idea and ran with it George Boole ( )

March 5, 2016EE345 – Micro-Controllers5 Axioms of Algebraic Structures A set of elements B and two binary operators + and ‧ 1.Closure w.r.t. the operator + ( ‧ ) x, y ∈ B ∋ x+y ∈ B 2.Associative w.r.t. + ( ‧ ) (x+y)+z= x+ (y+z) (x ‧ y) ‧ z= x ‧ (y ‧ z) 3.Commutative w.r.t. + ( ‧ ) x+y = y+x x ‧ y = y ‧ x

March 5, 2016EE345 – Micro-Controllers6 Axioms of Algebraic Structures 4.An identity element w.r.t. + ( ‧ ) 0+x = x+0 = x 1 ‧ x = x ‧ 1= x 5. ∀ x ∈ B, ∃ x' ∈ B (complement of x) ∋ x+x'=1 and x ‧ x'=0 6. ‧ is distributive over +: x ‧ (y+z)=(x ‧ y)+(x ‧ z) + is distributive over ‧ : x+(y ‧ z)=(x+y) ‧ (x+z)  Note the associative law can be derived no additive and multiplicative inverses complement

March 5, 2016EE345 – Micro-Controllers7 Boolean Algebra We need to define algebra for binary values  Developed by George Boole in 1854 Huntington postulates for Boolean algebra (1904):  Closure with respect to operator + and operator ·  Identity element 0 for operator + and 1 for operator ·  Commutativity with respect to + and · x+y = y+x, x·y = y·x  Distributivity of · over +, and + over · x·(y+z) = (x·y)+(x·z) and x+(y·z) = (x+y)·(x+z)  Complement for every element x is x’ with x+x’=1, x·x’=0  There are at least two elements x,y  B such that x  y

March 5, 2016EE345 – Micro-Controllers8 Boolean Algebra VERY good tool used to manipulate (simplify) Boolean functions Terminology:  Literal: A variable or its complement  Product term: literals connected by  Sum term: literals connected by +

March 5, 2016EE345 – Micro-Controllers9 Two-valued Boolean Algebra Two-valued Boolean is defined as  A set of elements B = {0,1} + operator: · operator: inverse: Observation? + is OR, · is AND, ’ is NOT xyx+y xyx·y xx' 01 10

March 5, 2016EE345 – Micro-Controllers10 Boolean Algebra Properties Let X: boolean variable, 0,1: constants 1. X + 0 = X -- Zero Axiom 2. X 1 = X -- Unit Axiom 3. X + 1 = 1 -- Unit Property 4. X 0 = 0 -- Zero Property 5. X + X = X -- Idepotence 6. X X = X -- Idepotence 7. X + X’ = 1 -- Complement 8. X X ’ = 0 -- Complement 9. (X ’ ) ’ = X-- Involution

March 5, 2016EE345 – Micro-Controllers11 Duality The principle of duality is an important concept. This says that if an expression is valid in Boolean algebra, the dual of that expression is also valid. To form the dual of an expression, replace all + operators with. operators, all. operators with + operators, all ones with zeros, and all zeros with ones. Form the dual of the expression a + (bc) = (a + b)(a + c) Following the replacement rules… a(b + c) = ab + ac Be careful not to alter the location of the parentheses if they are present.

March 5, 2016EE345 – Micro-Controllers12 Basic Theorems and Properties of Boolean Algebra Duality  the binary operators are interchanged; AND OR  the identity elements are interchanged; 1 0

March 5, 2016EE345 – Micro-Controllers13 Boolean Theorems Huntington’s postulates define some rules Need more rules to modify algebraic expressions  Theorems that are derived from postulates What is a theorem?  A formula or statement that is derived from postulates (or other proven theorems) Basic theorems of Boolean algebra  Theorem 1 (a): x + x = x (b): x · x = x  Looks straightforward, but needs to be proven ! Post. 1: closure Post. 2: (a) x+0=x, (b) x·1=x Post. 3: (a) x+y=y+x, (b) x·y=y·x Post. 4: (a) x(y+z) = xy+xz, (b) x+yz = (x+y)(x+z) Post. 5: (a) x+x’=1, (b) x·x’=0

March 5, 2016EE345 – Micro-Controllers14 Proof of x+x=x We can only use Huntington postulates: Show that x+x=x. x+x = (x+x)·1 by 2(b) = (x+x)(x+x’)by 5(a) = x+xx’by 4(b) = x+0by 5(b) = xby 2(a) Q.E.D. We can now use Theorem 1(a) in future proofs Huntington postulates: Post. 2: (a) x+0=x, (b) x·1=x Post. 3: (a) x+y=y+x, (b) x·y=y·x Post. 4: (a) x(y+z) = xy+xz, (b) x+yz = (x+y)(x+z) Post. 5: (a) x+x’=1, (b) x·x’=0

March 5, 2016EE345 – Micro-Controllers15 Proof of x·x=x Similar to previous proof Show that x·x = x. x·x = xx+0 by 2(a) = xx+xx’by 5(b) = x(x+x’)by 4(a) = x·1by 5(a) = xby 2(b) Q.E.D. Huntington postulates: Post. 2: (a) x+0=x, (b) x·1=x Post. 3: (a) x+y=y+x, (b) x·y=y·x Post. 4: (a) x(y+z) = xy+xz, (b) x+yz = (x+y)(x+z) Post. 5: (a) x+x’=1, (b) x·x’=0 Th. 1: (a) x+x=x

March 5, 2016EE345 – Micro-Controllers16 Absorption Property (Covering) 1. x + x y = x 2. x (x+y) = x (dual) Proof: x + x y = x 1 + x y = x (1+y) = x 1 = x QED (2 true by duality)

March 5, 2016EE345 – Micro-Controllers17 Consensus Theorem 1. xy + x ’ z + yz = xy + x ’ z 2. (x+y) (x ’ +z) (y+z) = (x+y) (x ’ +z) -- (dual) Proof: xy + x ’ z + yz = xy + x ’ z + (x+x ’ )yz = xy + x ’ z + xyz + x ’ yz = (xy + xyz) + (x ’ z + x ’ zy) = xy + x ’ z QED (2 true by duality).

March 5, 2016EE345 – Micro-Controllers18 Theorems to Apply to Exclusive-OR

March 5, 2016EE345 – Micro-Controllers19 Boolean Functions Elements and operators can express a function  Value of function determined by value of variables  Complete function is evaluated for all possible values Function can be represented by truth table  E.g., F 1 = x + y’z Evaluate in steps  E.g., y’ and y’z xyzy'y'zx+y'z

March 5, 2016EE345 – Micro-Controllers20 Logic Circuit Diagram of Function Logic function can be expressed as circuit diagram  Direct translation from algebraic expression Example: F 1 = x + y’z Problem: possibly multiple equivalent algebraic expressions  Difficult to compare Boolean functions

March 5, 2016EE345 – Micro-Controllers21 Design Problem Design the control logic for a fan in a greenhouse. The logic must sense three environmental conditions: 1. It is raining outside (variable x) 2. It is humid inside (variable y) 3. It is hot inside (variable z) The fan should turn on when It is humid AND it is not raining AND it is hot yx’z OR It is not humid AND ((its not raining AND it is hot) OR it is raining) y’ (x’z+x) Create a Boolean function that controls the fan.  F 1 = yx’z + y’(x’z+x)  F 2 = x’y’z+x’yz+xy’; F 3 = x’z+xy’ Question: How to evaluate these solutions (equivalent functions)? F

March 5, 2016EE345 – Micro-Controllers22 Boolean Function Representations Greenhouse example function can be expressed as: A nalytically, as sum of minterms : yx’z + y’(x’z+x)= yx’z+y’x’z+y’x = x’yz+x’y’z+xy’(z+z’) = x’yz+x’y’z+xy’z+xy’z’ xyzF2F  As a logic network  As a truth table  How to derive different solutions ?  How to evaluate these solutions ?

March 5, 2016EE345 – Micro-Controllers23 How to compare expressions? From the Greenhouse Example:  Is yx’z + y’(x’z+x) = x’z+xy’ ? (are these functions equivalent?) yx’z + y’(x’z+x)= yx’z+y’x’z+y’x = (y+y’)x’z+y’x = x’z+xy’  Yes, both expressions describe the same function (equivalent) Problem: hard to compare algebraic expressions  Easier with gate level comparison? Comparison of Boolean Functions

March 5, 2016EE345 – Micro-Controllers24 Comparison of Boolean functions Comparison by algebraic expression  Good: can handle many variables  Bad: not clear how to get one expression from another Comparison on gate level  Bad: same as algebraic expression  Bad: hard to modify for comparison Comparison by truth table  Good: Only one representation in truth table  Bad: cumbersome for 4 or more variables  Bad: hard to derive gate level implementation Comparison with canonical form  Good: standardized form for algebraic expression  Bad: not necessarily solution with least number of gates

March 5, 2016EE345 – Micro-Controllers25 Canonical Forms A form is canonical if representation of a function in this form is unique  Truth table is canonical representation  Uses minterms as basic component A minterm is a product (ANDing) of all variables  Each variable of function appears in minterm  Variable is in normal form (x) or in complemented form (x’) Example: minterms for 3-variable function All algebraic expressions can be converted into canonical form xyz mintermdesignation 000x'y'z'm0m0 001x'y'zm1m1 010x'yz'm2m2 011x'yzm3m3 100xy'z'm4m4 101xy'zm5m5 110xyz'm6m6 111xyzm7m7

March 5, 2016EE345 – Micro-Controllers26 Canonical Forms xyzF mintermdesignation 0000x'y'z'm0m0 0011x'y'zm1m1 0100x'yz'm2m2 0111x'yzm3m3 1001xy'z'm4m4 1011xy'zm5m5 1100xyz'm6m6 1110xyzm7m7  Function = sum of all minterms where truth table is 1 Function is expressed as sum of minterms Greenhouse example: yx’z + y’(x’z+x)= yx’z+y’x’z+y’x = x’yz+x’y’z+xy’(z+z’) = x’yz+x’y’z+xy’z+xy’z’ = m3 + m1 + m5 + m4

March 5, 2016EE345 – Micro-Controllers27 Canonical Forms Canonical form: Sum of minterms Example: F=A+B’C  Expansion of minterms: A = ABC+ABC’+AB’C+AB’C’ B’C = AB’C+A’B’C  F = ABC+ABC’+AB’C+ AB’C’+A’B’C Alternate forms:  F=m 1 +m 4 +m 5 +m 6 +m 7  F=∑(1,4,5,6,7) Is this the only canonical form?  No, other forms exist (dual form, etc.) ABC F mintermdesignation A'B'C'm0m A'B'Cm1m A'BC'm2m A'BCm3m AB'C'm4m AB'Cm5m ABC'm6m ABCm7m7

March 5, 2016EE345 – Micro-Controllers28 DeMorgan’s Theorem A key theorem in simplifying Boolean expressions DeMorgan’s theorem expresses duality:  For two variables: (x + y)’ = x’  y’ (x  y)’ = x’ + y’  Can be generalized to arbitrary number of variables (a+b+c+ …+z)’ = a’ b’ c’… z’, or (  x i )’ =  x i ’ (a b c    z)’ = a’+b’+c’+…+z’, or (  x i )’ =  x i ’ where:  = OR,  = AND Proof for DeMorgan’s theorem by truth tables  See Mano p. 59

March 5, 2016EE345 – Micro-Controllers29 Dual Canonical Form Sum of minterms can be converted to product of maxterms  Maxterms contain every variable in the function  Each maxterm is an OR of variables in different polarities  Function is a product (ANDing) of maxterms where truth table is 0 Due to duality:  m j ’ = M j Example:  F = M 0 ·M 2 ·M 3 = = (A+B+C)(A+B’+C)(A+B’+C’)  From DeMorgan: F’ = A’B’C’+A’BC’+A’BC = = m 0 +m 2 +m 3  Complement on both sides: F = m 1 +m 4 +m 5 +m 6 +m 7 Both canonical forms express same function ABC F MaxtermDesignation A+B+CM0M A+B+C’M1M A+B’+CM2M A+B’+C’M3M A’+B+CM4M A’+B+C’M5M A’+B’+CM6M A’+B’+C’M7M7

March 5, 2016EE345 – Micro-Controllers30 Dual Canonical Form Sum of minterms can be converted to product of maxterms Recall:  A minterm is a product (AND) of all variables in respective polarities (positive or complemented)  e.g., a’ b c’ is a minterm for a 3-variable function  Note: a b’ is not a minterm in a 3-variable function (it is a product term)  Function is OR of minterms where F = 1 A maxterm is a sum (OR) of all variables in respective polarities  Maxterm contains every variable in the function  All the variables are OR-ed together in a maxterm  Function is product (AND) of maxterms where F = 0

March 5, 2016EE345 – Micro-Controllers31 Dual Canonical Form Duality (DeMorgan):  (  x i )’ =  x i ’  m’ j = M j Example: F = (m1,m4,m5,m6,m7)  Examine the complement of F: F’ = m 0 +m 2 +m 3 = A’B’C’ + A’BC’ + A’BC  Take a complement (DeMorgan): (F’)’ = (A+B+C)(A+B’+C)(A+B’+C’) = M 0 ·M 2 ·M 3  Since (F’)’ = F : F = M 0 ·M 2 ·M 3 = m 1 +m 4 +m 5 +m 6 +m 7 Both canonical forms express same function:  F =  m i =  M i ABC F MaxtermDesignation A+B+CM0M A+B+C’M1M A+B’+CM2M A+B’+C’M3M A’+B+CM4M A’+B+C’M5M A’+B’+CM6M A’+B’+C’M7M7

March 5, 2016EE345 – Micro-Controllers32 Example Truth table for f 1 (a,b,c) at right The canonical sum-of-products form for f 1 is f 1 (a,b,c) = m 1 + m 2 + m 4 + m 6 = a ’ b ’ c + a ’ bc ’ + ab ’ c ’ + abc ’ The canonical product-of-sums form for f 1 is f 1 (a,b,c) = M 0 M 3 M 5 M 7 = (a+b+c) (a+b ’ +c ’ ) (a ’ +b+c ’ ) (a ’ +b ’ +c ’ ). Observe that: m j = M j ’ abcf1f

March 5, 2016EE345 – Micro-Controllers33 Shorthand: ∑ and ∏ f 1 (a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a sum-of-products form, and m(1,2,4,6) indicates that the minterms to be included are m 1, m 2, m 4, and m 6. f 1 (a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a product-of-sums form, and M(0,3,5,7) indicates that the maxterms to be included are M 0, M 3, M 5, and M 7. Since m j = M j ’ for any j, ∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f 1 (a,b,c)

March 5, 2016EE345 – Micro-Controllers34 Conversion between Canonical Forms Replace ∑ with ∏ (or vice versa) and replace those j ’ s that appeared in the original form with those that do not. Example: f 1 (a,b,c)= a ’ b ’ c + a ’ bc ’ + ab ’ c ’ + abc ’ = m 1 + m 2 + m 4 + m 6 = ∑ (1,2,4,6) = ∏ (0,3,5,7) = (a+b+c) (a+b ’ +c ’ ) (a ’ +b+c ’ ) (a ’ +b ’ +c ’ )

March 5, 2016EE345 – Micro-Controllers35 Standard Forms (NOT Unique) Standard forms are “ like ” canonical forms, except that not all variables need to appear in the individual product (SOP) or sum (POS) terms. Example: f 1 (a,b,c) = a ’ b ’ c + bc ’ + ac ’ is a standard sum-of-products form f 1 (a,b,c) = (a+b+c) (b ’ +c ’ ) (a ’ +c ’ ) is a standard product-of-sums form.

March 5, 2016EE345 – Micro-Controllers36 Conversion of SOP from standard to canonical form Expand non-canonical terms by inserting equivalent of 1 in each missing variable x: (x + x ’ ) = 1 Remove duplicate minterms f 1 (a,b,c) = a ’ b ’ c + bc ’ + ac ’ = a ’ b ’ c + (a+a ’ )bc ’ + a(b+b ’ )c ’ = a ’ b ’ c + abc ’ + a ’ bc ’ + abc ’ + ab ’ c ’ = a ’ b ’ c + abc ’ + a ’ bc + ab ’ c ’

March 5, 2016EE345 – Micro-Controllers37 Conversion of POS from standard to canonical form Expand noncanonical terms by adding 0 in terms of missing variables (e.g., xx ’ = 0) and using the distributive law Remove duplicate maxterms f 1 (a,b,c) = (a+b+c) (b ’ +c ’ ) (a ’ +c ’ ) = (a+b+c) (aa ’ +b ’ +c ’ ) (a ’ +bb ’ +c ’ ) = (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 ’ +b+c ’ )

March 5, 2016EE345 – Micro-Controllers38 Sum of Product (SOP) Form Any function can be expressed as Sum of Products (SOP)  A product term is a product (AND) of the variables in respective polarities  Minterm is a special case of product term (has all variables)  SOP is not canonical, many SOP forms exist for same function Greenhouse example : yx’z + y’(x’z+x) = x’yz + x’y’z + x y’ = x’z + xy’ xyzF  SOP table (list only for F=1) SOP has natural representation in practice, as two-level logic network

March 5, 2016EE345 – Micro-Controllers39 Counting Boolean Functions Now we can express algebraic functions uniquely  Unique sum of minterms or product of maxterms representations How many binary Boolean functions exist?  How many different combinations of minterms can one pick?  There are 4 minterms in a binary function  Each minterm can be present in the sum or not Two choices for each minterm  Total 2 4 =16 combinations How many Boolean functions exist with n variables?  2 n minterms  Total: 2 2 n combinations

March 5, 2016EE345 – Micro-Controllers40 Truth Table of Two Binary Variables

March 5, 2016EE345 – Micro-Controllers41 Possible combinations of Binary Boolean Functions

March 5, 2016EE345 – Micro-Controllers42 Digital Logic Gates Name Graphics Algebraic Truth Symbols Function Table

March 5, 2016EE345 – Micro-Controllers43 Digital Logic Gates Name Graphics Algebraic Truth Symbols Function Table

March 5, 2016EE345 – Micro-Controllers44 Multiple-input Gates NOR does not extend easily  Associativity does not hold Multiple-input gate: z

March 5, 2016EE345 – Micro-Controllers45 Multiple Input NAND and NOR Multiple NOR = a complement of OR gate Multiple NAND = a complement of AND gate The cascaded NAND operations = sum of products The cascaded NOR operations = product of sums

March 5, 2016EE345 – Micro-Controllers46 Multiple-input XOR Extension of exclusive-OR not straightforward  What is the definition for 3 variables? Turns into “odd” function  Function is 1 when there is an odd number of 1’s Uncommon in hardware implementations

March 5, 2016EE345 – Micro-Controllers47 Positive and Negative Logic Signal levels are represented as H (high) and L (low)  e.g., H is 5V and L is 0V Positive logic  H corresponds to logic 1  L corresponds to logic 0 Negative logic  H corresponds to logic 0  L corresponds to logic 1 User has choice of logic used

March 5, 2016EE345 – Micro-Controllers48 Positive and Negative Logic Truth table with H and L In positive logic: AND In negative logic: OR Arrows indicate negative logic

March 5, 2016EE345 – Micro-Controllers49 Integrated Circuits Small-scale integration (SSI)  10’s of logic gates  Early 1960’s Medium-scale integration (MSI)  100’s – 1000’s of logic gates  Late 1960’s Large-scale integration (LSI)  1000’s – 10,000’s of logic gates  Mid 1970’s Very large-scale integration (VLSI)  100,000’s of logic gates  1980’s Ultra large-scale integration (ULSI)  Millions of logic gates  1990’s and 2000’s

March 5, 2016EE345 – Micro-Controllers50

March 5, 2016EE345 – Micro-Controllers51 Logic Families TTL: transistor-transistor Logic  Standard family, very familiar  Used for a long time ECL: emitter-coupled logic  High speed of operation MOS: metal-oxide semiconductor  Suitable for circuits that need high component density CMOS: complementary metal-oxide semiconductor  Suitable for systems requiring low power consumption, such as digital cameras and hand-held digital devices

March 5, 2016EE345 – Micro-Controllers52 Characteristics of Digital Logic Families Fan-out: number of standard loads that the ouput of a typical gate can drive Fan-in: number of inputs available in a gate Power dissipation: power consumed by gate Propagation delay: average transition delay time for the signal to propagate from input to output Noise margin: minimum external noise voltage added to input signal that caused an undesirable change in the circuit output

March 5, 2016EE345 – Micro-Controllers53 Chip Design Why is it better to have more gates on a single chip?  Easier to build systems  Lower power consumption  Higher clock frequencies What are the drawbacks of large circuits?  Complex to design  Chips have design constraints  Hard to test Need tools to help develop integrated circuits  Computer Aided Design (CAD) tools  Automate tedious steps of design process  Hardware description language (HDL) describe circuits  VHDL is one such system (approved as standard by IEEE)