1 / 66

Lecture 2. How does the computer work?

CS 147. Lecture 2. How does the computer work?. Prof. Sin-Min Lee Department of Computer Science.

travis
Télécharger la présentation

Lecture 2. How does the computer work?

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. CS 147 Lecture 2. How does the computer work? Prof. Sin-Min Lee Department of Computer Science

  2. Practice, Practice, Practice!Use casette tape recorder to listen, practiceTry videotapingSeek feedback from friendsUse phrases, not sentencesNotes separate from slides (don’t read slide)Pick appropriate font, size (~ 24 point to 32 point)Estimate talk length ­ 2 minutes per slideUse extras as backup slides (Question and Answer)Use color tastefully (graphs, emphasis)Don’t cover slidesUse overlays or builds in powerpoint

  3. ‘Computer” of the day • Jacquard loom • late 1700’s • for weaving silk • “Program” on punch cards • “Microcode”: each hole • lifts a set of threads • “Or gate”: thread lifted if • any controlling hole punched

  4. Card Punch • Early “programmers” were well-paid (compared to loom operators)

  5. Computer Architecture = Instruction Set Architecture + Machine Organization + …

  6. Instruction Set Architecture • Instruction set architecture is the attributes of a computing system as seen by the assembly language programmer or compiler. This includes • Instruction Set (what operations can be performed?) • Instruction Format (how are instructions specified?) • Data storage (where is data located?) • Addressing Modes (how is data accessed?) • Exceptional Conditions (what happens if something goes wrong?) • A good understanding of computer architecture is important for compiler writers, operating system designers, and general computer programmers.

  7. Understanding Computer Basics

  8. Computer Case- The part of a computer system that houses the microprocessor, the RAM (Random Access Memory), and the Motherboard. This case also houses the disk drives. CPU (Central Processing Unit) - A chip or circuit that interprets and executes programs by processing a list of machine instructions which perform binary operations on data stored in memory. The portion of hardware in a computer which interprets instructions and then executes them. It is the heart of any computer system.

  9. Memory-The internal component that the computer uses to temporary store data and programs . There are two kinds of computer memory: RAM (Random Access Memory) and ROM (Read-Only Memory). RAM loses its data if the power is turned off; ROM retains its information whether the computer has power or not. Users are unable to erase ROM. Not to be confused with storage devices such as hard drives, floppy disks, or other such devices. Data is processed in RAM memory; it is stored on a storage device.

  10. Motherboard- The main circuit board in the computer.Every device is connected to the Motherboard. Also called planar, system board, or backplane, depending on the architecture of the board.

  11. Aug. 31, 2004, 12:05AMBig gain in small package Intel test chip boasts technology to add to speed Intel, the world's biggest semiconductor maker, said Monday it built a test chip with a new process that creates faster circuits by packing 10 million transistors into an area the size of the tip of a ballpoint pen. Intel, based in Santa Clara, Calif., has made the first working memory chip that uses so-called 65-nanometer technology to shrink the circuits inside chips, Intel researcher Mark Bohr said during a conference call.

  12. Video Card –This card connects to the Motherboard and the computer monitor connects to the videocard. That is how images are interpreted and displayed to the monitor.

  13. Network card- Device connected to the motherboard which is used for communicating on a network to other computers, printers and other electronic devices (ex. Phones, cell phones ect…)

  14. Network Card- Device connected to the motherboard which is used for communicating on a network to other computers, printers and other electronic devices (ex. Phones, cell phones ect…) Network Card Driver- A program that instructs the device on how to operate.

  15. Hard Drive- A device that is connected to the motherboard and is used for storage of data files. Usually this device is referred to as your c:\ drive. Storage capacity can be measured in Kb, Mb, Gb and Tb.

  16. Floppy Drive-A device that is also connected to the motherboard that allows you to use a portable storage media called floppies;which are used to store data. The floppies come 5 ¼’’(which are no longer popular) and 3 ½’’ sizes (which is still the most widely used media up-to-date.). The floppies storage capacity is no where near the storage capacity of a harddrive. ( Ex. 1Gb Harddrive can hold information that is on 695 floppies);Get the point?

  17. Bit

  18. so a k is...k in computing is short for kb or kilobytewhere kilo means the same as anywhere else in our measurement system: 1000 so a k is 1000 byteshow about Mb?b for byte again, and M for mega: megabyte big M for mega, small m means milli, or one thousandth, 1/1000as in mm, thousandths of a metremega in our measurement system means one million, 1 000 000 or a thousand thousand, so a megabyte is a thousand kilobytes or one million byteshow about GB?you can now buy hard disk drives in Gb, gigabytes, thousands of Mb or thousands of millions of bytes, so a 5Gb HDD holds 5000 Mb of data with some large computers storing up to Tb, terabytes... yup, thousands of Gb... so one terabyte (Tb) = 1000 gigabytes (Gb) = 1000 000 megabytes (Mb) = 1000 000 000 kilobytes (kb) = 1 000 000 000 000 bytes or one thousand billion bytes of information

  19. CD-ROM DRIVE-means Compact Disk - this drive uses a laser to read (read-only) the information in the tiny but complex pattern stamped permanently onto computer compact disks. Read Only Memory CD's are much tougher than floppies, and hold more than 600Mb of information CD-writer drives are now available,so people can burn their own CDs, e.g. to backup files permanently established computer shops or print shops now have their own CD-writers, and will backup your files by burning them.You can also record your music CD.

  20. Data Primitive Operations Sequence Control Data Access Storage Management Operating Environment May be actual hardware computer or software-simulated computer. Most computers a combination of the two. What is a Computer?

  21. In mathematics you don't understand things. You just get used to them.John von Neumann

  22. Typical Machine Layout • Two cycles: • Fetch cycle - get instruction • Execute cycle - do operation

  23. Typical Machine Execution Typical fetch cycle: (M(x) means contents of x) • M(IC)  MAR [Memory Address register] • IC +1  IC [Instruction Counter] • Read memory into MDR [Memory Data Register] • MDR  IR [Instruction Register for decoding]

  24. Typical Machine Execution (continued) Typical execute cycle: (OP R,X, DISP is instruction) • IR decoded into OP R, EA • OP is operation code (e.g., 8 bits) • R is register (e.g., 4 bits -- 16 registers) • EA is effective address (e.g., 20 bits) • M(X)+DISP  MAR (EA  MAR) • Read memory into MDR • M(R)  ALU; M(MDR)  ALU • Do operation OP in ALU; ALU  R For 500 MHZ: Each instruction 9-10 cycles (50 MIPS) By overlapping fetch and execute cycles, get 60-70 MIPS

  25. Typical Machine Translation Instruction format: Opcode register, index, offset load R1, R2, 24 For example: As we see later, memory for data in blocks of storage pointed to by a register: X = Y + Z could be translated as: load R1, R2, 28 [Location of Y] add R1, R2, 40 [Location of Z] store R1, R2, 24 [Location of X]

  26. Ways to Construct a Computer • Hardware Realization • Any precisely defined algorithm or data structure may be realized in hardware. • Firmware Realization • Microprogramming or emulation • Virtual Machine • Provided by a language environment • Combination

  27. Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Von Neumann Model of Execution Obtain instruction from program storage Determine required actions and instruction size Locate and obtain operand data Almost all Modern Computers are Von Neumann machines Compute result value or status Deposit results in storage for later use Determine successor instruction

More Related