switch
play

Switch Closed x = 1 A switch has two states Open Closed/On x = - PowerPoint PPT Presentation

Switch Closed x = 1 A switch has two states Open Closed/On x = 0 Open/Off Symbol S x William Sandqvist william@kth.se Implementation of logic functions The switchen can be used to implement logic functions S Power Light x


  1. Switch Closed x = 1 A switch has two states Open – Closed/On x = 0 – Open/Off Symbol S x William Sandqvist william@kth.se

  2. Implementation of logic functions The switchen can be used to implement logic functions S Power Light x supply  0 Light Off L(x) is a logic function =  L ( x )  1 Light On x is a logic variabel William Sandqvist william@kth.se

  3. The operation AND AND-operation ( • ) is achieved by switches that are connected in series S S Power x 1 x 2 Light supply = ⋅ L ( x , x ) x x 2 1 1 2 William Sandqvist william@kth.se

  4. The operation OR OR-operation (+) is achieved by switches connected in parallel S x 1 Power Light S supply x 2 = + L ( x , x ) x x 2 1 1 2 William Sandqvist william@kth.se

  5. Te operation NOT NOT-operation inverts the logic value R Power supply x S Light = L ( x ) x William Sandqvist william@kth.se

  6. Truth Table A logical function can also be described by a truth table 1 stands for true 0 stands for false AND OR William Sandqvist william@kth.se

  7. Logic gates AND-gate IEC Symbol (International Electrotechnical Commission) A B Y A & 0 0 0 Y B 0 1 0 1 0 0 Traditional (American) Symbol 1 1 1 = ⋅ A Y A B Y B William Sandqvist william@kth.se

  8. Logic gates OR-gate IEC Symbol (International Electrotechnical Commission) A A B Y 1 Y 0 0 0 B 0 1 1 1 0 1 Traditional (American) Symbol 1 1 1 A = + Y Y A B B William Sandqvist william@kth.se

  9. Logic gates inverter NOT IEC Symbol (International Electrotechnical Commission) Inverter 1 Y A A Y 0 1 Traditional (American) Symbol 1 0 Y = A Y A William Sandqvist william@kth.se

  10. What function has this gate circuit? x 1 A f B x 2 William Sandqvist william@kth.se

  11. Timing Diagram x 1 A f B x 2 1 x 1 0 1 x 2 0 1 A 0 1 B 0 1 f 0 Time William Sandqvist william@kth.se

  12. Truth Table x 1 A f B x 2 ( , ) x 1 x 2 f x x 1 2 A B 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 0 1 William Sandqvist william@kth.se

  13. Multiple gate circuits can implement the same functionality! x 1 A f a) B x 2 f = x 1 + x 1 ⋅ x 2 William Sandqvist william@kth.se

  14. Multiple gate circuits can implement the same functionality! x 1 A f f = g a) B x x f g x 2 2 1 0 0 1 1 f = x 1 + x 1 ⋅ x 2 0 1 0 0 1 0 1 1 x 1 1 1 1 1 b) g x 2 g = x 1 + x 2 William Sandqvist william@kth.se

  15. Boolean algebra • As several gate circuits can implement the same functionality, you want to find the most cost effective implementation • The gate circuits can be very large • A mathematical base is needed so that the automation of gate minimizing can be implemented with computers William Sandqvist william@kth.se

  16. Boolean algebra axiom William Sandqvist william@kth.se

  17. Venn-diagram Venn-diagram could be used to illustrate logic operations William Sandqvist william@kth.se

  18. Venn-diagram Venn-diagram could be used to illustrate logic operations x y x y z x ⋅ y + z x ⋅ y William Sandqvist william@kth.se

  19. Boolean algebra with Venn-diagram 1+A=1 0A=0 A’+A=1 AA’=0 A+A=A AA=A William Sandqvist william@kth.se

  20. Boolean algebra simple rules With the axiom as a base one can formulate new theorems William Sandqvist william@kth.se

  21. The duality principle If you have a valid boolean theorem, you get another valid theorem by simultaneously replacing – all 0 with 1 and all 1 with 0 – all AND with OR and all OR with AND William Sandqvist william@kth.se

  22. Two- and Three- Variable Properties William Sandqvist william@kth.se

  23. Example Prove the consensus theorem (17a) – with algebraic manipulation William Sandqvist william@kth.se

  24. Proof of consensus ⋅ + ⋅ = ⋅ + ⋅ + ⋅ x y x z x y y z x z 17 a) ⋅ + ⋅ + ⋅ = x y y z x z ( right side) = ⋅ ⋅ + + + ⋅ ⋅ + ⋅ + ⋅ ( ) ( ) ( ) x y z z x x y z x y y z = ⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ x y z x y z x y z x y z x y z x y z = ⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ x y z x y z x y z x y z = ⋅ ⋅ + + ⋅ ⋅ + ⋅ x y ( z z ) x z ( y y ) = ⋅ + ⋅ = ( left side) x y x z William Sandqvist william@kth.se

  25. Notation Options Different authors use different notations! William Sandqvist william@kth.se

  26. William Sandqvist william@kth.se

  27. Analysis and Synthesis Synthesis – Construction of a gate circuit that implements a given logic function Analysis – Analysing the logical operation of an existing gate circuit William Sandqvist william@kth.se

  28. How can the following truth table be implemented with logic gates? William Sandqvist william@kth.se

  29. ( Why this truth table? ) Faucet Pressure Gismo … open/closed 1/0 on/off 1/0 OK OK not OK OK Blind guess: Warn if pressure is on at the same time as the faucet is closed . William Sandqvist william@kth.se

  30. How can the following truth table be implemented with logic gates? 1. Logic function f = x 2 + x 1 x 2 + x 1 x 2 1 x William Sandqvist william@kth.se

  31. How can the following truth table be implemented with logic gates? 2. Making a direct implementation of the logic function. f = x 2 + x 1 x 2 + x 1 x 2 1 x x 1 x 2 f William Sandqvist william@kth.se

  32. How can the following truth table be implemented with logic gates? 2. (Better) Minimize the logic function = + + f x x x x x x 1 2 1 2 1 2 = + + + x x x x x x x x addl redundant term x x (7b) 1 2 1 2 1 2 1 2 1 2 = + + + x ( x x ) ( x x ) x Distributi on (12a) 1 2 2 1 1 2 = ⋅ + ⋅ 1 1 x x (8b) 1 2 = + x x 1 2 William Sandqvist william@kth.se

  33. How can the following truth table be implemented with logic gates? 3. Implement the minimized function f = x 1 + x 2 x 1 f x 2 Much simpler implementation! William Sandqvist william@kth.se

  34. Discussion: Algebraic Manipulation • Algebraic manipulation of logical expressions can lead to efficient implementations • But: For large networks, it may be very difficult to identify possible optimizations We need a method that works for all combinational network! William Sandqvist william@kth.se

  35. Minterms and Maxterms • A minterm is a product term for a logical function with all the variables of the logic function represented • A maxterm is a summary term for a logical function with all the variables of the logic function represented William Sandqvist william@kth.se

  36. Minterm and Maxterm = 1 = 0 William Sandqvist william@kth.se

  37. Introduktion SoP och PoS The following logic function should be described by a Boolean expression William Sandqvist william@kth.se

  38. S um of P roducts SoP m 1 m 4 m 5 m 6 ∑ f = x 2 x 3 + x 1 x 3 + x 1 x 2 x 3 + x 1 x 2 x 3 = 1 x 2 x m (1,4,5,6) William Sandqvist william@kth.se

  39. Sum - of - Products A sum of products (sum-of-products) is a logic function f that is formed by summing the product terms so that f becomes 1 if one of the product terms becomes 1. - The following abbreviations are used SOP (English) and SP (Swedish) In SOP-normal form, all product terms are minterms, it is also named disjunctive normal form. William Sandqvist william@kth.se

  40. Products - of - Sums M 0 M 2 M 3 M 7 ∏ = + + ⋅ + + ⋅ + + ⋅ + + = f ( x x x ) ( x x x ) ( x x x ) ( x x x ) M ( 0 , 2 , 3 , 7 ) 1 2 3 1 2 3 1 2 3 1 2 3 William Sandqvist william@kth.se

  41. Products - of - Sums A product of sums (product-of-sums) is a logic function f which is formed by the product of the sum of terms such that f is 0 if one of sumterms is 0. - The following abbreviations are used POS (English) and PS (Swedish) In POS-normal form all sumterms are maxterms - It is also referred to as conjunctive normal form William Sandqvist william@kth.se

  42. Duality between Minterms and Maxterms and between SP and PS • To each minterm there is a corresponding = = maxterm f m M i i = = ⋅ ⋅ = + + = + + M m x x x x x x x x x 1 2 3 0 0 1 2 3 1 2 3 (use DeMorgan 15a) • To each SP there is a corresponding PS ∑ ∏ f = m (1,4,5,6) = M (0,2,3,7) William Sandqvist william@kth.se

  43. William Sandqvist william@kth.se

  44. Logic gates NAND-gate IEC Symbol (International Electrotechnical Commission) A B Y A 0 0 1 & Y 0 1 1 B 1 0 1 1 1 0 Traditional (American) Symbol = ⋅ Y A B A Y B William Sandqvist william@kth.se

  45. Logic gates NOR-gate IEC Symbol (International Electrotechnical Commission) A B Y A 1 Y 0 0 1 B 0 1 0 1 0 0 Traditional (American) Symbol 1 1 0 A = + Y A B Y B William Sandqvist william@kth.se

  46. Only one type of gate is needed! For implementing a Boolean function requires only NAND or NOR gates NOT = AND = OR = William Sandqvist william@kth.se

Recommend


More recommend