Presentation is loading. Please wait.

Presentation is loading. Please wait.

Let’s Go Buy a Computer. So What’s in a Computer? Processor brains Memory scratch paper Disk long term memory I/O communication (senses) Software reconfigurability.

Similar presentations


Presentation on theme: "Let’s Go Buy a Computer. So What’s in a Computer? Processor brains Memory scratch paper Disk long term memory I/O communication (senses) Software reconfigurability."— Presentation transcript:

1 Let’s Go Buy a Computer

2 So What’s in a Computer? Processor brains Memory scratch paper Disk long term memory I/O communication (senses) Software reconfigurability

3 What’s in a Computer? CPU Communications I/O Text Sound Software Power Disk RAM Ports

4 Putting Together an Application Word (is a part of the Office application) Runs on Windows (an operating system) Which runs on a Dell PC (a computer) Which has a Pentium (a processor) Enhanced by connections to monitor, printer, network Uses random access memory (RAM) to work on document, disk (non-volatile) memory to store in Need a CD-ROM to install application (or install off the Internet over a broadband connection)

5 Let’s Go Buy a Computer

6 Computer Configuration Processor (Pentium IV, 2.8 GHz) RAM (512 MB of SDRAM (expandable)) Disk (80 GB) CD ROM/ CD RW/DVD/… 17" XGA TFT Display (1280 x 1024 res.) 3.5" 1.44MB Floppy Disk Drive S3 Savage IX 128-bit AGP 2x graphics –8MB memory, 3D Hardware acceleration, composite TV-Out support, … 16-bit Sound

7 Computer Configuration (contd) 2 Type-I or Type-II slots or 1 Type-III slot 2 USB Ports Built-in 56Kbps V.90 Data/fax modem Built-in 10/100 Ethernet Adapter and 802.11b/g wireless Also –universal AC adapter, –built-in Lithium-Ion battery, –Microsoft Windows XP, –Encarta World Encyclopedia online version…

8 What’s Special About a Computer? Most complex object made by humans A rich communication mechanism for society Amazing how it works Reconfigurability Moore’s Law

9 More for Less --Moore’s Law 1985 when I was a student here –A desktop machine in the lab $150,000 (now < $1,000) 700 KHz chip (now ~3 GHz) 1 MB memory (now 128-512 MB) 80 MB disk (now 80 GB +) CD-ROM had just been invented (83) Minimal Internet connection Communication to Internet 9600 bps (now 10 Mbps)

10 Moore’s Law (contd) $150,000 (now < $1,000) –Factor of 150 700 Khz processor (now 2 GHz chip) –Factor of 3000 1 MB memory (now 256MB) –Factor of 256 80 MB disk (now 40/80 GB) –Factor of 1000 Communication 9600 bps (now 10 Mbps) –Factor of 1000

11 An interesting example: Walmart/Microtel PC AMD 1.5 GHz Sempron processor with 3DNow! Technology 128 MB DDR Memory, expandable to 2 GB 20 GB Ultra ATA-100 Hard Drive / 5400 RPM 52x CD-ROM drive Integrated 10/100 Ethernet Connection Integrated graphics up to 64 MB shared video memory Integrated 5.1 Channel AC'97 Audio Available drive bays: Two 5.25", one 3.5“ No operating system installed Speakers, but no display Price: $198

12 Moore’s Law (contd) year log (people per computer) Mainframe Minicomputer Workstation PCLaptop PDA ??? * This slide and the next lifted from a presentation by David Culler

13 Moore’s Law (contd) Itanium2 (241M ) nearly a thousand 8086’s would fit in a modern microprocessor Processing & Storage LNA mixer PLL baseband filters I  Q  Communication Sensing Actuation SOON:

14 Rest of the Course Hardware: Building a computer –How arithmetic and logical operations are realized –How data are represented –How memory is realized –How sequencing is done and state machines are realized Software: Programming and Using a computer –Programs and Programming languages –Algorithms –Applications: Graphics and Sound Operating Systems, Networking and Distributed Computing –Operating Systems –Basic Networking –Applications: E-mail and the Internet –Peer-to-peer and music sharing Hard Problems and Limits of Computing Security, Privacy, Artificial Intelligence (?)

15 Let’s Build a Computer

16 Building a computer Really Simple Stuff

17 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

18 Why NOT build a computer? Computers seem really complicated –Pentium IV chip has 42 million transistors –(in an area of 217 square mm, ) How can we hope to understand them ?

19 Analogy with Building a House Components Glue for combining components Modeling the process Tools and Rules In fact, computer design is called computer architecture

20 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, …

21 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

22 Details Wires are made of silicon or other chemicals Crossing wires implement transistors, the basic unit of computer design Transistors control the flow of electrons (current) –They either do or don’t flow through –Think of light switches turning current on or off Wire thickness is currently about.1 micron –1 micron = 10 -6 meters –Can fit 42 million transistors in less than 1.5cmx1.5cm Design must follow fabrication rules –Wires can’t get too close (unless they cross) A key tool is abstraction

23 What is Abstraction? Ignoring or hiding details to capture essential features for the purpose at hand E.g. 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.

24 Abstraction in Everyday Life Parent says: “Brush your teeth” Parent doesn’t specify: –What kind of toothbrush –What kind of toothpaste –What you’re wearing –etc. These things aren’t important to the order at hand

25 Abstraction (cont.) If we had to spell out everything in full detail, our lives would be really complicated Abstraction allows us to understand things in a modular fashion Same is true for computers: To understand them, we use abstraction

26 It’s Not 100 Million Transistors It’s a few major functional components –Each exposes a functional interface –They’re connected to one another with wires Each is composed of a number of smaller components –Each of which exposes a functional interface –They’re connected to one another with wires And so on, until each is composed of a few transistors –There’s usually a lot of regularity among these (many similar building blocks)

27 Layers of Abstraction Really Simple Stuff Computers Build more powerful tools out of simpler ones What’s the really simple stuff? –0s and 1s

28 Layers of Abstraction (cont.) 0s and 1s Computers Logic gates Logic circuits MemoryState Machines

29 Logic and Logic Gates

30 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 A Simple Logic Puzzle

31 What do 0’s and 1’s mean? For now, we’ll take “Natural meanings:” For example, if we have a variable ‘Alice’ that denotes whether Alice goes to the party, If Alice goes, we say Alice = 1 If Alice doesn’t, we say Alice = 0 0 = False1 = True Using 0s and 1s

32 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: ANDare all inputs true? ORis at least one input true? NOTflip the truth value Logic Gates

33 “Zac will go to the party if Xena AND Yanni go.” AND X Y Z X Y Z FF F FT F TF F TT T “Truth Table” AND Gate

34 “Zac will go to the party if Xena AND Yanni go.” AND X Y Z X Y Z 000 01 0 10 0 11 1 “Truth Table” AND Gate

35 AND Gate (contd) AND Gate is a circuit that allows output current to flow if both inputs are flowing –i.e. output is 1 if and only if both inputs are 1

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

37 AND W Y Z X W X Y Z 000? 001? 010? 011? 100? 101? 110? 1 11? AND Gate (cont.)

38 W X Y Z 0000 0010 0100 0110 1000 1010 1100 1 111 AND W Y Z X AND Gate (cont.)

39 “Zac will go to the party if Xena OR Yanni go.” OR X Y Z X Y Z FF F FT T TF T TT T Truth Table OR Gate (cont.)

40 “Zac will go to the party if Xena OR Yanni go.” OR X Y Z X Y Z 00 0 01 1 10 1 11 1 Truth Table OR Gate (cont.)

41 OR Gate is a circuit that allows output current to flow if either input is flowing –i.e. output is 1 if either input is 1 (or both inputs are 1) OR Gate (contd)

42 OR W Y Z X W Y Z X is shorthand for: OR Gate (contd)

43 OR W Y Z X W X Y Z 000? 001? 010? 011? 100? 101? 110? 1 11? OR Gate (contd)

44 OR W Y Z X W X Y Z 0000 0011 0101 0111 1001 1011 1101 1 111 OR Gate (contd)

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

46 NOT Gate is a circuit that reverses the sense of a flow. –i.e. Logical complement: Output is 1 if and only if input is 0 NOT Gate (contd)

47 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? Back to Our Simple Logic Puzzle

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

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

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

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

52 OR AND Ed Dan Frank Alice and Bob decide to go, but Carol stays home. 1 1 0 Carole Alice Bob Logic Puzzle Circuit: Inputs

53 OR AND Ed Dan Frank Evaluation … 1 1 0 Carole Alice Bob 1 1 0 0 Logic Puzzle Circuit (contd)

54 OR AND Ed Dan Frank Evaluation … 1 1 0 Carole Alice Bob 1 1 0 0 1 Logic Puzzle Circuit (contd)

55 OR AND Ed Dan Frank Evaluation … 1 1 0 Carole Alice Bob 1 1 0 0 1 0 Logic Puzzle Circuit (contd)

56 OR AND Ed Dan Frank Evaluation … 1 1 0 Carole Alice Bob 1 1 0 0 1 0 1 1 Logic Puzzle Circuit (contd)

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

58 OR AND Ed Dan Frank What if: Alice, Bob, and Carol all go to the party? 1 1 1 Carole Alice Bob Logic Puzzle Circuit: Different Inputs

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

60 All Clear?

61 Suppose someone gives us an arbitrary Truth Table. How do we build a circuit which satisfies exactly that Truth Table? Building Circuits

62 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. Let’s start with the Truth Table instead Our Friend the Logic Puzzle

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

64 Alice Bob Carole Frank 0000 0010 0100 0110 1000 1010 1101 1 110 Note: Frank goes only if A=B=1 and C=0 Truth Table for Logic Puzzle Circuit

65 AND A C F B A B C F 0000 0010 0100 0110 1000 1010 1100 1 111 Recall the AND Gate

66 AND A C F B A B C F 0000 0010 0100 0110 1000 1010 1101 1 110 Modify the AND Gate

67 AND A C F B Note: Frank goes only if A=B=1 and C=0. The modified AND also solves the Logic Puzzle! A B C F 0000 0010 0100 0110 1000 1010 1101 1 110 Modify the AND Gate

68 AND A C F B ? A B C F 0000 0010 0100 0110 1000 1010 1101 1 110 Modify the AND Gate?

69 AND A C F B A B C F 0000 0011 0100 0110 1000 1010 1100 1 110 Sure …

70 AND A C F B Similarly, we can make a circuit for any Truth Table with only a single 1 in its output. A B C F 0000 0010 0101 0110 1000 1010 1100 1 110 Similarly …

71 First, make circuits for every row in the Truth Table that has a 1 in the output. A B C F 0000 0011 0101 0110 1000 1010 1101 1 110 Given Any Truth Table

72 AND A C B A C A C B B A B C F 0000 0011 0101 0110 1000 1010 1101 1 110 A Circuit from Any Truth Table (contd)

73 OR AND A C B A C A C B B Finally, combine them with an OR gate. F A Circuit from Any Truth Table (contd)

74 OR AND A C B A C A C B B The only way F=1 is if at least ONE of the AND gates outputs a 1. But each AND gate corresponds to a row in the Truth Table with a 1 in the output! F A Circuit from Any Truth Table (contd)

75 First, make circuits for each row in the Truth Table that has a 1 in the output. A B C X 0001 0010 0100 0110 1000 1010 1100 1 111 Another Example

76 AND A C A C B B A B C X 0001 0010 0100 0110 1000 1010 1100 1 111 Another Example (contd)

77 OR Finally, combine them with an OR gate. X AND A C A C B B Another Example

78 Same idea works no matter how many input variables. So for ANY Truth Table we can write down, we can make a circuit for it using only 3 Logic Gates: AND, OR, NOT This gives us a very powerful tool ! Our first technical use of abstraction: “Make a circuit for that Truth Table” is something we can abstract and understand. Universality

79 Some issues to think about on your own We know that AND,OR, and NOT together are “universal” – we can make a circuit for any Truth Table using just these gates ! What else is universal? Surprising answer: There is a single gate called “NAND” which is universal all by itself! Additional Issues

80 NAND X Y Z X Y Z 00 1 01 1 10 1 11 0 AND X Y Z NAND Gate

81 NAND X Y Z X Y Z 00 1 01 1 10 1 11 0 Truth Table NAND X 1 Z X Y Z 1 1 0 0 1 1 Fix Y at 1 NOT from a NAND Gate

82 Some issues to think about on your own: We saw two circuits for the Logic Puzzle that both worked – but one (the modified AND) was much simpler than the other. Can you come up with methods for simplifying circuits? This is important for efficiency when you are dealing with very large Truth Tables (which we will see in the future). Additional Issues

83 Are We Done?


Download ppt "Let’s Go Buy a Computer. So What’s in a Computer? Processor brains Memory scratch paper Disk long term memory I/O communication (senses) Software reconfigurability."

Similar presentations


Ads by Google