1 / 71

Administrivia

Administrivia. Any new students? Has everyone been to the course web site? First assignment ready – pick it up on web Labs to begin Monday Location 007 Friend Details Pick up lab on web, read it, do it Laptops or desktops? Questions??. Building a computer. Why build a computer?.

Download Presentation

Administrivia

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Administrivia • Any new students? • Has everyone been to the course web site? • First assignment ready – pick it up on web • Labs to begin Monday • Location 007 Friend • Details Pick up lab on web, read it, do it • Laptops or desktops? • Questions??

  2. Building a computer

  3. Why build a computer? • Curiosity • What really happens when I hit a key? • Necessity • Prerequisite to parts of the course • Breadth • Should understand what’s changing the world

  4. Why NOT build a computer? • Computers seem really complicated ! • Pentium III has over 28 MILLION components • How can we hope to understand them ?

  5. Questions in building a house • What are the basic components • 2”x4”’s, I-beams, plasterboard, .. • Light fixtures, plumbing, … • What is glue for combining them • Nails, screws, bolts, pipes, … • How do we model the process • Architectural drawings, building codes, …

  6. Questions in building a computer • What are the basic components • Logic gates • What is glue for combining them • Wires to build circuits • How do we model the process • Architectural drawings, design rules, … • Mathematical formulation

  7. Details • Wires are made of silicon or chemicals • Crossing wires make transistors • Electrons either do or don’t flow in wires • Think of light switches turning current on or off • Wire thickness currently about .135 micron • 1 micron = 10-6 meters • Can fit 28 million transistors in less than 1”x1” • Design must follow fabrication rules • Non-crossing wires can’t get too close • Mathematical abstraction – Boolean algebra

  8. What is Abstraction? • Ignoring / Hiding details to capture essential common features • Example for us: We’ll ignore whether we’re talking about: • A Pentium II or a Pentium III • A Mac or a PC • Instead, we’ll focus on what really makes a computer a computer.

  9. Abstraction (cont.) • Real Life Example: “Brush your teeth” • Here, we ignore: • What kind of toothbrush • What kind of toothpaste • What you’re wearing • etc. • These things aren’t important! • Often called hand waving

  10. Abstraction (cont.) • Abstraction allows us to understand things in a Modular fashion. • If we had to spell out everything we did, our lives would seem really complicated. • Same is true for computers.To understand them, we use abstraction. • Working bottom up.

  11. Layers of Abstraction • Build more and more powerful tools out of simpler ones. Really Simple Stuff Computers

  12. Really Simple Stuff Computers Layers of Abstraction (cont.) • Each layer corresponds to a beautiful Big Idea of computer science. • These ideas are the foundation for the “digital revolution” that everyone talks about.

  13. Really Simple Stuff Computers Layers of Abstraction (cont.) • For Computers, What is the“Really Simple Stuff”? • Answer: “ 0’s and 1’s ”

  14. The secret lives of 0’s and 1’s

  15. A Simple Logic Puzzle • Frank will go to the party if Ed goes AND Dan does NOT. • Dan will go if Bob does NOT go OR if Carole goes. • Ed will go to the party if Alice AND Bob go. • Alice and Bob decide to go,but Carol stays home. • Will Frank go to the party?

  16. A Simple Logic Puzzle • Frank will go to the party if Ed goes AND Dan does NOT. • Dan will go if Bob does NOT go OR if Carole goes. • Ed will go to the party if Alice AND Bob go. • Alice and Bob decide to go,but Carol stays home. • Will Frank go to the party? • Answer: YES

  17. Using 0’s and 1’s • What do 0’s and 1’s mean? • For now, we’ll take “Natural meanings:” • For example, if we have a variable Alice forwhether Alice goes to the party, • If Alice goes, we write Alice = 1 • If Alice doesn’t, we write Alice = 0 0 = False 1 = True

  18. Logic Gates • Computers are circuits made of Logic Gates. • Logic gates manipulate 0’s and 1’s (False and True) by letting electrons flow or not. • We’ll look at three types of Logic Gates: • AND are all inputs true? • OR is one input true? • NOT flip the truth value

  19. AND Gate AND • “Zac will go to the party if XenaANDYanni go.” X Z Y X Y Z F F F F T F T F F T T T “Truth Table”

  20. AND Gate (cont.) AND • “Zac will go to the party if XenaANDYanni go.” X Z Y X Y Z 0 0 0 0 1 0 1 0 0 1 1 1 Truth Table

  21. AND Gate (cont.) • ANDGate is a circuit that allows output current to flow if both inputs are flowing.

  22. AND Gate (cont.) W Z Y AND AND AND X is shorthand for: W Z X Y

  23. AND Gate (cont.) X W Z Y AND W X Y Z 0 0 0 ? 0 0 1 ? 0 1 0 ? 0 1 1 ? 1 0 0 ? 1 0 1 ? 1 1 0 ? 1 1 1 ?

  24. AND Gate (cont.) X W Z Y AND W X Y Z 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1

  25. OR Gate OR • “Zac will go to the party if XenaORYanni go.” X Z Y X Y Z F F F F T T T F T T T T Truth Table

  26. OR Gate (cont.) OR • “Zac will go to the party if XenaORYanni go.” X Z Y X Y Z 0 0 0 0 1 1 1 0 1 1 1 1 Truth Table

  27. OR Gate (cont.) • ORGate is a circuit that allows output current to flow if either input is flowing.

  28. OR Gate (cont.) OR OR OR W Z X Y is shorthand for: W Z X Y

  29. OR Gate (cont.) OR W Z W X Y Z 0 0 0 ? 0 0 1 ? 0 1 0 ? 0 1 1 ? 1 0 0 ? 1 0 1 ? 1 1 0 ? 1 1 1 ? X Y

  30. OR Gate (cont.) OR W Z W X Y Z 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 X Y

  31. NOT Gate NOT • “Yanni will go to the party if Xena does NOT go.” Y X Shorthand: Y X X Y 0 1 1 0 Truth Table

  32. NOT Gate (cont.) • NOTGate is a circuit that reverse the sense of a flow. • Logical complement.

  33. A Simple Logic Puzzle • Frank will go to the party if Ed goes AND Dan does NOT. • Dan will go if Bob does NOT go OR if Carole goes. • Ed will go to the party if Alice AND Bob go. • Alice and Bob decide to go,but Carol stays home. • Will Frank go to the party?

  34. AND NOT Logic Puzzle Circuit Ed Frank Dan Frank will go to the party if Ed goes AND Dan does NOT.

  35. AND Logic Puzzle Circuit (cont.) Ed Frank Dan Frank will go to the party if Ed goes AND Dan does NOT.

  36. AND AND Logic Puzzle Circuit (cont.) Alice Ed Frank Bob Dan Ed will go to the party if Alice AND Bob go.

  37. AND AND OR Logic Puzzle Circuit (cont.) Alice Ed Frank Bob Dan Carole Dan will go if Bob does NOT go OR if Carole goes.

  38. AND AND OR Logic Puzzle Circuit (cont.) 1 Alice Ed Frank 1 Bob Dan 0 Carole Alice and Bob decide to go,but Carol stays home.

  39. AND AND OR Logic Puzzle Circuit (cont.) 1 1 Alice Ed Frank 1 1 Bob 0 Dan 0 0 Carole Evaluation…

  40. AND AND OR Logic Puzzle Circuit (cont.) 1 1 Alice Ed 1 Frank 1 1 Bob 0 Dan 0 0 Carole Evaluation…

  41. AND AND OR Logic Puzzle Circuit (cont.) 1 1 Alice Ed 1 Frank 1 1 Bob 0 0 Dan 0 0 Carole Evaluation…

  42. AND AND OR Logic Puzzle Circuit (cont.) 1 1 Alice Ed 1 1 Frank 1 1 Bob 0 1 0 Dan 0 0 Carole Evaluation…

  43. AND AND OR Logic Puzzle Circuit (cont.) 1 1 Alice Ed 1 1 1 Frank 1 1 Bob 0 1 0 Dan 0 0 Carole Evaluation Complete! Answer: Frank goes to the party.

  44. AND AND OR Logic Puzzle Circuit (cont.) 1 Alice Ed Frank 1 Bob Dan 1 Carole What if: Alice, Bob, and Carol all go to the party?

  45. AND AND OR Logic Puzzle Circuit (cont.) 1 1 Alice Ed 1 1 0 Frank 1 1 Bob 0 0 1 Dan 1 1 Carole What if: Alice, Bob, and Carol all go to the party? Answer: Frank does NOT go to the party!

  46. Intermission • Is it all clear? • Should/Could we do another such problem? • Light controllers • Light fixture has 3 switches • Light is on if an odd number of the switches are on

  47. Building Circuits • Suppose someone gives us an arbitraryTruth Table. • Can we build a circuit which satisfiesexactly that Truth Table?

  48. Our Logic Puzzle • Frank will go to the party if Ed goes AND Dan does NOT. • Dan will go if Bob does NOT go OR if Carole goes. • Ed will go to the party if Alice AND Bob go. • Suppose we made the truth table forthis puzzle.

  49. AND AND OR Logic Puzzle Circuit Alice Ed Frank Bob Dan Carole The full circuit for the Logic Puzzle.

  50. Logic Puzzle Circuit (cont.) Alice Bob Carole Frank 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0 Note: Frank goes only if A=B=1 and C=0 Truth Table for Logic Puzzle

More Related