Gates and Logic: From switches to Transistors , Logic Gates and Logic Circuits

  • View
    54

  • Download
    8

Embed Size (px)

DESCRIPTION

Gates and Logic: From switches to Transistors , Logic Gates and Logic Circuits. Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University. See: P&H Appendix B.2 and B.3 (Also, see B.0 and B.1 ) . Goals for Today. - PowerPoint PPT Presentation

Text of Gates and Logic: From switches to Transistors , Logic Gates and Logic Circuits

PowerPoint Presentation

Gates and Logic:From switches to Transistors, Logic Gates and Logic CircuitsProf. Kavita Bala and Prof. Hakim WeatherspoonCS 3410, Spring 2014Computer ScienceCornell UniversitySee: P&H Appendix B.2 and B.3 (Also, see B.0 and B.1)

Goals for TodayFrom Switches to Logic Gates to Logic CircuitsLogic GatesFrom switchesTruth TablesLogic CircuitsIdentity LawsFrom Truth Tables to Circuits (Sum of Products)Logic Circuit MinimizationAlgebraic ManipulationsTruth Tables (Karnaugh Maps) Transistors (electronic switch)

A switchActs as a conductor or insulatorCan be used to build amazing things

The Bombe used to break the German Enigma machine during World War II

Pictures show the Bombe built by Alan Turing to break the enigma machine ciphers.They were Fixed-Program Computers came before stored-program computers (general purpose)The former required re-wiring (e.g. ENIAC took 3 weeks to re-wire).

Basic Building Blocks: Switches to Logic GatesEither (OR)

Both (AND)

+--ABLightOFFOFFOFFONONOFFONONABABABLightOFFOFFOFFONONOFFONONTruth Table+Speed and size of a mechanical switchBasic Building Blocks: Switches to Logic GatesEither (OR)

Both (AND)

--ABABABLightOFFOFFOFFONONOFFONONABLightOFFOFFOFFONONOFFONONTruth TableORANDSpeed and size of a mechanical switchBasic Building Blocks: Switches to Logic GatesEither (OR)

Both (AND)

--ABABABLight00011011ABLight00011011Truth Table0 = OFF1 = ONORANDSpeed and size of a mechanical switchBasic Building Blocks: Switches to Logic GatesDid you know?George Boole Inventor of the idea of logic gates. He was born in Lincoln, England and he was the son of a shoemaker in a low class family.

ABAB

George Boole,(1815-1864)ORANDE.g. logic statements:Jane will only go to the cinema tonight if a good film is on AND she has enough money.Stuart will only go to the birthday party on Sunday if Katie OR Sujit is going too.

TakeawayBinary (two symbols: true and false) is the basis of Logic DesignAdd takeways at end of a block. Possibly build on takeaways throughout lecture8Building Functions: Logic GatesNOT:

AND:

OR:

Logic Gatesdigital circuit that either allows a signal to pass through it or not.Used to build logic functionsThere are seven basic logic gates: AND, OR, NOT, NAND (not AND), NOR (not OR), XOR, and XNOR (not XOR) [later]ABOut000011101111ABOut000010100111AOutABABAFlash DrivesCreate truth table of AND or OR: state what they doBuilding Functions: Logic GatesNOT:

AND:

OR:

Logic Gatesdigital circuit that either allows a signal to pass through it or not.Used to build logic functionsThere are seven basic logic gates: AND, OR, NOT, NAND (not AND), NOR (not OR), XOR, and XNOR (not XOR) [later]ABOut000011101111ABOut000010100111AOut0110ABABAFlash DrivesCreate truth table of AND or OR: state what they do

Did you know? Logic gates allow the computer to do things such as add, divide, multiply, do simple yes and no reasoning in certain situations along with other things.

NOT:

AND:

OR:

Logic Gatesdigital circuit that either allows a signal to pass through it or not.Used to build logic functionsThere are seven basic logic gates: AND, OR, NOT, NAND (not AND), NOR (not OR), XOR, and XNOR (not XOR) [later]Building Functions: Logic GatesABOut000011101111ABOut000010100111AOut0110ABABAABOut001010100110ABOut001011101110ABABNAND:NOR:Flash DrivesCreate truth table of AND or OR: state what they do

Did you know? Logic gates allow the computer to do things such as add, divide, multiply, do simple yes and no reasoning in certain situations along with other things.

Goals for TodayFrom Switches to Logic Gates to Logic CircuitsLogic GatesFrom switchesTruth TablesLogic CircuitsIdentity LawsFrom Truth Tables to Circuits (Sum of Products)Logic Circuit MinimizationAlgebraic ManipulationsTruth Tables (Karnaugh Maps) Transistors (electronic switch)

Next GoalGiven a Logic function, create a Logic Circuit that implements the Logic Functionand, with the minimum number of logic gates

Fewer gates: A cheaper ($$$) circuit!

Can get logic circuit from truth tableMinimize logic circuit through algebraic reductions or Karnaugh Maps13NOT:

AND:

OR:

XOR:

.Logic GatesABOut000011101111ABOut000010100111AOut0110ABABAABOut000011101110ABXOR is not a basic Logic Gate since it can be created from AND and OR gates, but it is often used as a basic Logic OperatorNOT:

AND:

OR:

XOR:

.Logic GatesABOut000011101111ABOut000010100111AOut0110ABABAABOut000011101110ABABOut001010100110ABOut001011101110ABABNAND:NOR:ABOut001010100111ABXNOR:XOR is not a basic Logic Gate since it can be created from AND and OR gates, but it is often used as a basic Logic OperatorLogic EquationsApologize that there are three ways to represent the same logic equation

XOR is not a basic Logic Gate since it can be created from AND and OR gates, but it is often used as a basic Logic OperatorAND is productOR is sumRead outloudLogic EquationsApologize that there are three ways to represent the same logic equation

XOR is not a basic Logic Gate since it can be created from AND and OR gates, but it is often used as a basic Logic OperatorAND is productOR is sumRead outloudIdentitiesIdentities useful for manipulating logic equationsFor optimization & ease of implementation

a + 0 = a + 1 = a + =

a 0 = a 1 = a = Minimization activityMaybe use picture to go through

Complement a+=1 and a=0IdentitiesLogic Manipulationfunctions: gates truth tables equationsExample: (a+b)(a+c) = a + bcabc000001010011100101110111(a+b)(a+c)= aa + ab + ac + bc= a + a(b+c) + bc= a(1 + (b+c)) + bc= a + bcTakeawayBinary (two symbols: true and false) is the basis of Logic Design

More than one Logic Circuit can implement same Logic function. Use Algebra (Identities) or Truth Tables to show equivalence.Add takeways at end of a block. Possibly build on takeaways throughout lecture21Think-Pair-Share: Why does minimization matterGoals for TodayFrom Switches to Logic Gates to Logic CircuitsLogic GatesFrom switchesTruth TablesLogic CircuitsIdentity LawsFrom Truth Tables to Circuits (Sum of Products)Logic Circuit MinimizationAlgebraic ManipulationsTruth Tables (Karnaugh Maps) Transistors (electronic switch)

Next GoalHow to standardize minimizing logic circuits?Logic MinimizationHow to implement a desired logic function?

abcout00000011010001111000101111001110Draw circuit and go through out=true casesHave not done cheaply yetLogic MinimizationHow to implement a desired logic function?

abcout00000011010001111000101111001110Write mintermssum of products:OR of all minterms where out=1minterma b ca b ca b ca b ca b ca b ca b ca b cShow what out equalsLogic MinimizationHow to implement a desired logic function?

abcout00000011010001111000101111001110Write mintermssum of products:OR of all minterms where out=1

minterma b ca b ca b ca b ca b ca b ca b ca b cShow what out equalsKarnaugh MapsHow does one find the most efficient equation?Manipulate algebraically until?Use Karnaugh maps (optimize visually)Use a software optimizer

For large circuitsDecomposition & reuse of building blocks

abcout00000011010001111001101111001110Minimization with Karnaugh maps (1)abcout00000011010001111001101111001110Sum of minterms yieldsout =

Karnaugh maps identify which inputs are (ir)relevant to the output0001110100 01 11 1001cabMinimization with Karnaugh maps (2)abcout000000110100011110011011110011100001110100 01 11 1001cabMinimization with Karnaugh maps (2)Karnaugh Minimization Tricks (1)0111001000 01 11 1001cab1111001000 01 11 1001cabKarnaugh Minimization Tricks (2)100100000000100100 01 11 100001abcd1110000010011001000000 01 11 100001abcd1110Dont care values can be interpreted individually in whatever way is convenientassume all xs = 1out = d

assume middle xs = 0assume 4th column x = 1out =Karnaugh Minimization Tricks (3)100x0xx00xx0100100 01 11 100001abcd111000001xxx1xx1000000 01 11 100001abcd1110MultiplexerA multiplexer selects between multiple inputsout = a, if d = 0out = b, if d = 1

Build truth tableMinimize diagramDerive logic diagramabdabdout000001010011100101110111What is the truth tableTakeawayBinary (two symbols: true and false) is the basis of Logic Design

More than one Logic Circuit can implement same Logic function. Use Algebra (Identities) or Truth Tables to show equivalence.

Any logic function can be implemented as sum of products. Karnaugh Maps minimize number of gates.Add takeways at end of a block. Possibly build on takeaways throughout lecture36Goals for TodayFrom Transistors to Gates to Logic CircuitsLogic GatesFrom transistorsTruth TablesLogic CircuitsIdentity LawsFrom Truth Tables to Circuits (Sum of Products)Logic Circuit MinimizationAlgebraic ManipulationsTruth Tables (Karnaugh Maps) Transistors (electronic switch)

Activity#4 How do we build electronic switches?Transistors:6:10 minutes (watch from from 41s to 7:00)http://www.youtube.com/watch?v=QO5FgM7MLGg

Fill our Transistor Worksheet with info from Video Everything that we have shown them can be constructed in silicon.38NMOS Transistor

Connect source to drain when gate = 1N-channelVDVS = 0 VVGVG = VSVG = 0 VNMOS and PMOS TransistorsPMOS Transistor

Connect source to drain when gate = 0P-channelVSVD = 0 VVGVG = VSVG = 0 VNMOS Transistor

Connect source to drain when gate = 1N-channelVDVS = 0 VVGVG = 1VG = 0NMOS and PMOS TransistorsPMOS Transistor

Connect source to drain when gate = 0P-channelVSVD = 0 VVGVG = 1VG = 0InverterInOut0110Function