gates and logic from transistors to logic gates and logic
play

Gates and Logic: From Transistors to Logic Gates and Logic Circuits - PowerPoint PPT Presentation

Gates and Logic: From Transistors to Logic Gates and Logic Circuits Prof. Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy,


  1. Gates and Logic: From Transistors to Logic Gates and Logic Circuits Prof. Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer.

  2. Goals for Today • From Switches to Logic Gates to Logic Circuits • Understanding the foundations of • Computer Systems Organization and Programming Digital = + Design

  3. Goals for Today • From Switches to Logic Gates to Logic Circuits • Understanding the foundations of • Computer Systems Organization and Programming • e.g. Galaxy Note 8

  4. Goals for Today • From Switches to Logic Gates to Logic Circuits • Understanding the foundations of • Computer Systems Organization and Programming • e.g. Galaxy Note 8 • with the big.LITTLE 8-core ARM processor

  5. Goals for Today • From Switches to Logic Gates to Logic Circuits • Understanding the foundations of • Computer Systems Organization and Programming • e.g. Galaxy Note 8 • with the big.LITTLE 8-core ARM processor big Quad Core LITTLE Quad Core Architecture ARM v7a ARM v7a Process Samsung 28nm Samsung 28nm Frequency 200MHz~1.8GHz+ 200MHz~1.2GHz Area 19mm2 3.8mm2 Power-ratio 1 0.17 L1 Cache Size 32 KB I/D Cache 32 KB I/D Cache L2 Cache Size 2 MB Data Cache 512 KB Data Cache

  6. Goals for Today • From Switches to Logic Gates to Logic Circuits • Logic Gates  From switches  Truth Tables • Logic Circuits  Identity Laws  From Truth Tables to Circuits (Sum of Products) • Logic Circuit Minimization  Algebraic Manipulations  Truth Tables (Karnaugh Maps) • Transistors (electronic switch)

  7. A switch • Acts as a conductor or insulator • Can be used to build amazing things… The Bombe used to break the German Enigma machine during World War II

  8. Basic Building Blocks: Switches to Logic Gates + Truth Table A A A A A A B B B B B Light Light Light Light Light - OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF ON ON ON B ON ON OFF OFF ON ON

  9. Basic Building Blocks: Switches to Logic Gates + Truth Table A A A A A A B B B B B Light Light Light Light Light - OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF ON ON ON ON B ON ON OFF OFF ON ON ON ON + A A A A A A B B B B B Light Light Light Light Light - OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF ON ON ON B ON ON OFF OFF ON ON

  10. Basic Building Blocks: Switches to Logic Gates • Either (OR) + Truth Table A A B Light - OFF OFF OFF OFF ON ON B ON OFF ON ON ON ON • Both (AND) + A A B Light - OFF OFF OFF OFF ON OFF B ON OFF OFF ON ON ON

  11. Basic Building Blocks: Switches to Logic Gates • Either (OR) Truth Table A A B Light - OFF OFF OFF OR OFF ON ON B ON OFF ON ON ON ON • Both (AND) A A B Light - OFF OFF OFF AND OFF ON OFF B ON OFF OFF ON ON ON

  12. Basic Building Blocks: Switches to Logic Gates • Either (OR) Truth Table A A B Light - 0 0 0 0 = OFF OR 1 = ON 0 1 1 B 1 0 1 1 1 1 • Both (AND) A A B Light - 0 0 0 AND 0 1 0 B 1 0 0 1 1 1

  13. Basic Building Blocks: Switches to Logic Gates A OR B George Boole,(1815-1864) • Did you know? A • George Boole Inventor of the idea AND of logic gates. He was born in Lincoln, England and he was the son B of a shoemaker in a low class family.

  14. Takeaway • Binary (two symbols: true and false) is the basis of Logic Design

  15. Building Functions: Logic Gates • NOT: A Out A • AND: A B Out 0 0 0 A 0 1 0 B 1 0 0 • OR: 1 1 1 A B Out A 0 0 0 B 0 1 1 1 0 1 1 1 1 • Logic Gates  digital circuit that either allows a signal to pass through it or not.  Used to build logic functions  There are seven basic logic gates: AND, OR, NOT

  16. Building Functions: Logic Gates • NOT: A Out A 0 1 1 0 • AND: A B Out 0 0 0 A 0 1 0 B 1 0 0 • OR: 1 1 1 A B Out A 0 0 0 B 0 1 1 1 0 1 1 1 1 • Logic Gates  digital circuit that either allows a signal to pass through it or not.  Used to build logic functions  There are seven basic logic gates: AND, OR, NOT , NAND (not AND), NOR (not OR), XOR, and XNOR (not XOR) [later]

  17. Building Functions: Logic Gates • NOT: A Out A 0 1 1 0 • AND: A B Out A B Out NAND: 0 0 0 0 0 1 A A 0 1 0 0 1 1 B B 1 0 0 1 0 1 • OR: 1 1 1 1 1 0 NOR: A B Out A B Out A A 0 0 0 0 0 1 B B 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 • Logic Gates  digital circuit that either allows a signal to pass through it or not.  Used to build logic functions  There are seven basic logic gates: AND, OR, NOT , NAND (not AND), NOR (not OR), XOR, and XNOR (not XOR) [later]

  18. iClicker Question Which Gate is this? Function: Symbol: a b Out Truth Table: a (A) NOT b (B) OR Out (C) XOR (D) AND (E) NAND

  19. Which Gate is this? iClicker Question • XOR: out = 1 if a or b is 1, but not both; • out = 0 otherwise. • out = 1, only if a = 1 AND b = 0 • OR a = 0 AND b = 1 a b Out 0 0 0 0 1 1 1 0 1 1 1 0 a (A) NOT b (B) OR Out (C) XOR (D) AND (E) NAND

  20. Which Gate is this? iClicker Question • XOR: out = 1 if a or b is 1, but not both; • out = 0 otherwise. • out = 1, only if a = 1 AND b = 0 • OR a = 0 AND b = 1 a b Out 0 0 0 0 1 1 1 0 1 1 1 0 a Out (A) NOT b (B) OR (C) XOR (D) AND (E) NAND

  21. Activity#2: Logic Gates • Fill in the truth table, given the following Logic Circuit made from Logic AND, OR, and NOT gates. • What does the logic circuit do? a b d Out 0 0 0 0 0 1 0 1 0 a 0 1 1 1 0 0 Out d 1 0 1 1 1 0 b 1 1 1

  22. Activity#2: Logic Gates • Multiplexor: select (d) between two inputs (a and b) and set one as the output (out)? • out = a, if d = 0 • out = b, if d = 1 a b d Out 0 0 0 0 0 0 1 0 0 1 0 0 a 0 1 1 1 1 0 0 1 Out d 1 0 1 0 1 1 0 1 b 1 1 1 1

  23. Goals for Today • From Switches to Logic Gates to Logic Circuits • Logic Gates  From switches  Truth Tables • Logic Circuits  Identity Laws  From Truth Tables to Circuits (Sum of Products) • Logic Circuit Minimization  Algebraic Manipulations  Truth Tables (Karnaugh Maps) • Transistors (electronic switch)

  24. Next Goal • Given a Logic function, create a Logic Circuit that implements the Logic Function… • …and, with the minimum number of logic gates • Fewer gates: A cheaper ($$$) circuit!

  25. Logic Gates A Out NOT: 0 1 A 1 0 A B Out 0 0 0 AND: A 0 1 0 B 1 0 0 1 1 1 OR: A B Out A 0 0 0 B 0 1 1 1 0 1 XOR: 1 1 1 A B Out A 0 0 0 0 1 1 B 1 0 1 1 1 0

  26. Logic Gates A Out NOT: 0 1 A 1 0 A B Out A B Out NAND: 0 0 0 0 0 1 AND: A A 0 1 0 0 1 1 B B 1 0 0 1 0 1 1 1 1 1 1 0 NOR: OR: A B Out A B Out A A 0 0 0 0 0 1 B B 0 1 1 0 1 0 1 0 1 1 0 0 XOR: 1 1 1 1 1 0 XNOR: A B Out A B Out A 0 0 0 A 0 0 1 0 1 1 0 1 0 B B 1 0 1 1 0 0 1 1 0 1 1 1

  27. Logic Implementation • How to implement a desired logic function? a b c out 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0

  28. Logic Implementation • How to implement a desired logic function? 1) Write minterms a b c out minterm 2) sum of products: 0 0 0 0 a b c • OR of all minterms where out=1 0 0 1 1 a b c 0 1 0 0 a b c 0 1 1 1 a b c 1 0 0 0 a b c 1 0 1 1 a b c 1 1 0 0 a b c 1 1 1 0 a b c

  29. Logic Implementation • How to implement a desired logic function? 1) Write minterms a b c out minterm 2) sum of products: 0 0 0 0 a b c • OR of all minterms where out=1 0 0 1 1 a b c 0 1 0 0 a b c a bc + a � • E.g. out = ab c + � b c 0 1 1 1 a b c a b 1 0 0 0 a b c c out 1 0 1 1 a b c 1 1 0 0 a b c 1 1 1 0 a b c corollary: any combinational circuit can be implemented in two levels of logic (ignoring inverters)

  30. Logic Equations • NOT: = !a = ¬ a  out = ā • AND:  out = a ∙ b = a & b = a ∧ b • OR:  out = a + b = a | b = a ∨ b • XOR:  out = a ⊕ b = a � b + āb • Logic Equations  Constants: true = 1, false = 0  Variables: a, b, out, …  Operators (above): AND, OR, NOT, etc.

  31. Logic Equations • NOT: = !a = ¬ a  out = ā • AND: NAND:  out = a ∙ b = a & b = a ∧ b • out = a ∙ b = !(a & b) = ¬ (a ∧ b) • OR: NOR:  out = a + b = a | b = a ∨ b • out = a + b = !(a | b) = ¬ (a ∨ b) • XOR: XNOR:  out = a ⊕ b = a � b + āb • out = a ⊕ b = ab + ab • Logic Equations  Constants: true = 1, false = 0  Variables: a, b, out, …  Operators (above): AND, OR, NOT, etc. • .

  32. Identities Identities useful for manipulating logic equations – For optimization & ease of implementation a + 0 = a + 1 = a + ā = a ∙ 0 = a ∙ 1 = a ∙ ā =

  33. Identities Identities useful for manipulating logic equations – For optimization & ease of implementation a + 0 = a a a + 1 = 1 a + ā = 1 b a ∙ 0 = 0 a ∙ 1 = a a a ∙ ā = 0 b

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