week 15
play

Week 15 Logic Gates Circuit Examples Logic Gates Adders Fall - PowerPoint PPT Presentation

Week 15 Logic Gates Overview Functions Week 15 Logic Gates Circuit Examples Logic Gates Adders Fall 2013 Student Responsibilities Week 15 Week 15 Logic Gates Reading : Textbook, Section 11.1 11.3 Overview Attendance : Finally!


  1. Week 15 Logic Gates Overview Functions Week 15 Logic Gates Circuit Examples Logic Gates Adders Fall 2013

  2. Student Responsibilities — Week 15 Week 15 Logic Gates Reading : Textbook, Section 11.1 – 11.3 Overview Attendance : Finally! Encouraged Functions Logic Gates Circuit Week 15 Overview Examples Adders How Boolean logic and Boolean algebra relate to computer circuits and chips. Sec 11.1 Boolean Functions Sec 11.2 Representing Boolean Functions Sec 11.3 Logic Gates

  3. 9.1 Boolean Functions Week 15 Boolean Algebra provides the operations [ complement, Logic Gates product, sum ] and rules for working with the set { 0, 1 } . Overview Functions Complement (denoted with bar): 0 = 1, 1 = 0. Logic Gates Circuit Product (denoted with AND , • , or implicit): Examples 1 • 1 = 1 1 • 0 = 0 0 • 1 = 0 0 • 0 = 0 Adders Sum (denoted with OR or +): 1 + 1 = 1 1 + 0 = 1 0 + 1 = 1 0 + 0 = 0 Precedence of Operators : complement, product, sum Example : (1 + 0) • (0 • 1) = 1 • 0 = 1 • 1 = 1

  4. Boolean Functions Week 15 Logic Gates Let B = { 0 , 1 } Overview Functions Logic Gates A Boolean variable x assumes values only from B . Circuit Examples Adders A Boolean Function of Degree n is a function from B n , the set { ( x 1 , x 2 , . . . , x n ) | x i ∈ B , 1 ≤ i ≤ n } , to B . Function values are often displayed in tables.

  5. Boolean Expressions Week 15 Logic Gates Boolean Expressions , which can represent Boolean functions, are made up from Boolean variables and Overview operations. Functions Logic Gates Circuit They are defined recursively as follows: Examples Adders 0 , 1 , x 1 , x 2 , . . . , x n are Boolean expressions. If E 1 and E 2 are Boolean expressions, then so are their complements, their product, and their sum: ( E 1 E 2 ), and ( E 1 + E 2 ) E 1 , Each Boolean expression represents a Boolean function.

  6. Function Evaluation Week 15 To evaluate a function, we substitute 0’s and 1’s for the Logic Gates variables in the same way we did for Truth Tables. Overview Table 1. F ( x , y , z ) = x + yz Functions F ( x , y , z ) = x + yz x y z x yz Logic Gates Circuit 1 1 1 0 1 1 Examples Adders 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1

  7. Equivalence of Boolean Functions Week 15 Logic Gates Overview Two Boolean functions F and G are equivalent if and only if Functions when they are evaluated on the variables b 1 , b 2 , . . . , b n ∈ B : Logic Gates Circuit Examples F ( b 1 , b 2 , . . . , b n ) = G ( b 1 , b 2 , . . . , b n ) Adders All these functions are equivalent: xy + 0 xy • 1 xy

  8. Boolean Operators on Functions Week 15 The complement of the Boolean function F is the function Logic Gates F , where: Overview F ( x 1 , . . . , x n ) = F ( x 1 , . . . , x n ) Functions Logic Gates Circuit Examples The Boolean sum F + G is defined by: Adders ( F + G )( x 1 , . . . , x n ) = F ( x 1 , . . . , x n ) + G ( x 1 , . . . , x n ) The Boolean product FG is defined by: ( FG )( x 1 , . . . , x n ) = F ( x 1 , . . . , x n ) G ( x 1 , . . . , x n )

  9. Degree of a Function The degree of a Boolean function is the number of different Week 15 variables upon which it depends. Logic Gates F ( x 1 , . . . , x n ) has degree n . Overview Functions Logic Gates Table 3. Boolean Functions of Degree 2. Circuit x y F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8 Examples 1 1 1 1 1 1 1 1 1 1 Adders 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 x y F 9 F 10 F 11 F 12 F 13 F 14 F 15 F 16 1 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0

  10. Table 4. The Number of Boolean Functions of Degree n Week 15 Degree Number Logic Gates 1 4 2 16 Overview 3 256 Functions 4 65,536 Logic Gates 5 4,294,967,296 Circuit Examples 6 18,446,744,073,709,551,616 Adders Boolean Function with degree n There are 2 n n -tuples of 0’s and 1’s — representing all possible combinations of the n variable values. Each function is an assignment of 0’s and 1’s to each of these n –tuples Hence, there are 2 2 n different Boolean functions of degree n .

  11. Boolean Identities Week 15 Identity Name Logic Gates x = x Law of Double Complement x + x = x Idempotent Laws Overview xx = x Functions Logic Gates x + 0 = x Identity Laws x(1) = x Circuit Examples x + 1 = 1 Dominance Laws Adders x(0) = 0 x + y = y + x Commutative Laws xy = yx x + (y + z) = (x + y) + z Associative Laws x(yz) = (xy)z x + yz = (x + y) (x + z) Distributive Laws x(y + z) = xy + xz xy = x + y De Morgan’s Laws x + y = xy

  12. Boolean Algebra A Boolean algebra is a set B with: Week 15 two binary operations, ∨ and ∧ Logic Gates elements 0 and 1 Overview a unary operation such that the following properties hold Functions ∀ x , y , z ∈ B : Logic Gates Circuit x ∨ 0 = x Identity Laws Examples x ∧ 1 = x Adders x ∨ x = 1 Dominance Laws x ∧ x = 0 ( x ∨ y ) ∨ z = x ∨ ( y ∨ z ) Associative Laws ( x ∧ y ) ∧ z = x ∧ ( y ∧ z ) x ∨ y = y ∨ x Commutative Laws x ∧ y = y ∧ x x ∨ ( y ∧ z ) = ( x ∨ y ) ∧ ( x ∨ z ) Distributive Laws x ∧ ( y ∨ z ) = ( x ∧ y ) ∨ ( x ∧ z )

  13. Equivalent Collections Week 15 Logic Gates Collections which satisfy all three Boolean Algebra properties include: Overview Functions Logic Gates B = { 0 , 1 } , with { + , •} and the complement operator Circuit Examples Adders The set of propositions in n variables with the ∨ and ∧ operators, F and T , and the negation operator. The set of subsets of a universal set U with ∩ and ∪ , ∅ , and set complementation operator.

  14. They All Tie Together Week 15 Logic Gates Overview To establish results about each of Functions Boolean expressions Logic Gates Circuit Propositions Examples Adders and Sets , we need only prove results about abstract Boolean Algebras!

  15. Section 11.3 — Logic Gates Week 15 Logic Gates Computer chips are made up of vast numbers of circuits. Overview Functions Circuits can be designed using the rules of Boolean algebra. Logic Gates Circuit Examples The basic components of circuits are called gates and each Adders type of gate implements a Boolean operation. We can use the rules of Boolean algebra to combine gates into circuits that perform various tasks. Input and output will both be from the set 0, 1.

  16. Week 15 The combinatorial circuits or gating networks we’ll be Logic Gates studying depend only upon the inputs , and not on the current state of the circuit - i.e., they have no memory Overview capabilities. Functions Logic Gates Circuit Examples Adders The three types of elements we’ll use to create circuits are: the inverter , which produces the complement of its input value; the OR gate, which produces the sum of its inputs, and the AND gate, which produces the product of its inputs

  17. Symbolic Gates Week 15 The symbols used for these types of elements are shown below: Logic Gates inverter : Overview x x Functions Logic Gates Circuit Examples OR gate : Adders x x + y y AND gate : x xy y

  18. Multiple Input Gates Week 15 We can also have multiple input OR and AND gates. Examples of gates with n inputs are shown below: Logic Gates Overview x Functions 1 x 2 Logic Gates x + x + ... + x 1 2 n Circuit x n Examples Adders x 1 x 2 x x ... x 1 n 2 x n Inputs enter inverters and gates from the their left sides and output is shown leaving from their right sides. There is only one way for current to flow through these components.

  19. Week 15 Combinational circuits can be constructed using a Logic Gates combination of inverters, OR, and AND gates. Overview Functions Logic Gates Circuit When combinations of circuits are formed, some gates may Examples Adders share inputs. There are two common ways to show this: One is to give the same name to the separate inputs for each gate, as shown in the first figure on the next slide. The other is to use branches that indicate all gates using a given input. This is shown in the second figure.

  20. Week 15 x xy Logic Gates y Overview xy + xy Functions x Logic Gates x xy Circuit y Examples Adders x y xy + xy x xy

  21. Examples of Circuits: ( x + y )¯ x Week 15 Logic Gates Overview x+y x Functions Logic Gates y Circuit Examples Adders (x+y)x x x

  22. Examples of Circuits: ¯ x ( y + ¯ z ) Week 15 Logic Gates Overview Functions x x Logic Gates x(y+z) Circuit Examples Adders y+z y y+z z z

  23. Two–Switch Light (0 = off, 1 = on) Week 15 Logic Gates Flipping either switch should turn the light on Overview if it’s off, and off if it’s on. Functions Logic Gates Circuit Examples 2–switch light Adders x y F(x, y) 1 1 1 1 0 0 0 1 0 0 0 1

  24. Three–Switch Light (0 = off, 1 = on) Week 15 Logic Gates 3–switch light Overview x y z F(x, y, z) Functions 1 1 1 1 Logic Gates 1 1 0 0 Circuit Examples 1 0 1 0 Adders 1 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 0

  25. Three Voters with Majority Rule Week 15 Logic Gates 3–Votes, Majority Rules Overview x y z M(x, y, z) Functions 1 1 1 Logic Gates 1 1 0 Circuit Examples 1 0 1 Adders 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend