+ All Categories
Home > Documents > Lecture1.ppt

Lecture1.ppt

Date post: 08-Jan-2016
Category:
Upload: tikaadants
View: 216 times
Download: 0 times
Share this document with a friend

of 48

Transcript
  • Lecture 1Comp 120 Spring 2002Joe Capowski336 Sitterson [email protected]

  • Class RollMy first chance to learn who you areEveryone will be accepted into the courseAnyone not on roll: print your name and PID on the last page

  • QuestionnairePlease turn them in

  • Teaching AssistantsJoshua Stough [email protected] 349 Sitterson 962-1975Hours: Tues 1-2:30, Friday 3:30-5

    Fang-Yi Tsai [email protected] 041 Sitterson 962-1916Office hours will be posted on website

  • Class ScheduleTues and Thurs 2 - 3:15 Sitterson 014Come to class! Some stuff is presented only here.Will not follow book exactlyClass will be interactive

  • TextbookPatterson and HennesseyComputer Organization and DesignMorgan Kaufmann PublishersExcellent book, but chapters out of the order we will usePay attention to green boxes The Big Picture

  • What is Comp 120?The stuff in the machine and how it worksDigital logicCircuit componentsData representationArchitecture and implementationAssembly language programming

  • Comp 120 has 3 partsBasics and Assembler language Chapters 1, 3, 4, appendices A, B-1Processor and performance Chapters 5, 2, appendices B-2, CEnhancements for speed and capacity, I/O Chapters 6, 7, 8

  • Comp 120 PrerequisitesFormal: Comp 114 or my permissionInformal: A year of programming in some high- level language, e.g., C, C++, Java Access to a computer with a compiler Lots of experience using PCs, Windows Intellectual curiosity; whats in the box?

  • Course webpageVisit it every day for current info, announcements, lecture notes, etc.

    www.cs.unc.edu (dept home page) select academic affairs select course home pages select this course

  • Lecture notes on websiteAvailable a few days in advanceDownload and print before class to save a lot of verbatim note-takingInstructions on website under Frequently Asked Questions (FAQ)

  • Non-programming assignmentsTurn them in on their due date at the start of class on paper

    Collaboration is strongly encouraged, buteach person must understand what he turns in

  • Programming AssignmentsStart early.never wait until night before Hard to predict how long it will take Usually takes more than one sitting Need time to think and discuss Unanticipated events will occur

  • Programming assignmentsDo them in any campus computer lab, or on your own computerSPIM simulator is installed on campus machinesDownload it onto your own machine as explained on page xvii of the textbook

  • Programming AssignmentsComp Sci dept has two computing labs, SN 019 and SN 030, not sure yet what their status is for Comp 120

  • Programming assignmentsDownload copy of grading sheet from webpageTurn in grading sheet, your listing, printout of results if applicable, all stapled together.Include an honor code pledge in the comments of the listing.remember to sign it.Turn the package in at the start of class.

  • Programming assignmentsI emphasize:Clarity -- must be understandable to humanSimplicity -- no payoff for being cute

    Computer efficiency rarely importantProgram short length rarely important

  • Prog Assignments -- CollaborationCollaboration OK, even encouraged discuss and understand assignments discuss techniques and concepts

    but...

  • Prog assignments -- collaborationEach student must independently Devise his problem solution Enter his own program Debug and run his own program Understand his own program

    More description on course handout

  • Keep your returned materialsThe assignments build on each other.We record about many grades, so we do make mistakesIf you think we erred, your information is the proofKeep everything until you get your final grade

  • Comp 120 is the most important course you will ever take ..

  • Principles endure

    Details change to increase speed and capacity

    My personal story

  • Assignment for Tues, Jan 17Read course handoutRead P&H Chapter 1Do exercises 1.1 through 1.44 (dont panic, theyre just match the definition things)

  • Ready for first substance?

  • What is computer?Any ideas?

  • Computer: electronic machine thatStores numeric dataDoes logical and arithmetic operations on the dataReceives data from userPresents data to userObediently follows your program

  • A computer has..Four basic parts Computer Memory Magnetic Memory Devices (disks) Central Processing Unit (CPU) Input-Output (I/O) devices

  • H&P list 5 functional partsData pathControl Part of the Central Processing Unit (CPU)MemoryInput devicesOutput devices

  • 5 Classic Computer Components

  • Central Processing Unit (CPU)Decodes and executes machine language instructionsFetches instructions and data from memoryCalculates results and returns them to memoryDatapath: the circuits where the data flowControl: hardware that decodes instructions and controls the data flow, like a traffic cop.

  • Principle of AbstractionHardware and software have hierarchical layersLower layers hide details from higher onesThe user or programmer doesnt have to know the lower level details to use the systemDriving a car is a good analogyBut analogy fails when you need performanceImplementation: how the details are constructed

  • Three levels of language High Level Language (e.g., Java) change = cash - cost - tax;Assembler Language mov cash, temp sub cost, temp sub tax, temp mov temp, change

  • Three levels of languageMachine Language 10100101 1011010, 1010010 10010101 1101101, 1110101 10010101 1101001, 1110101 11101101 1101100, 1101101All three levels do the same thingHigh level is best for a person

  • Instruction Set ArchitectureDesign the hardware to execute the machine language exactlyISA is the interface between the machine language and the hardware

  • Instruction Set ArchitectureGood News: different implementations of hardware are possible with no change in softwareBad News: Sacrifice speed enhancements that would be possible by changing the software.

  • Instruction Set ArchitectureBig Messages:Hardware and software are related -- you need to design them simultaneously if you want maximal performance.Sacrifice some performance or increase complexity (cost) to keep software constant (e.g., Family of 360 machines)

  • Three levels of language High Level Language (e.g., Java) change = cash - cost - tax;

    This one statement has: three operands two operators

  • Three levels of language Assembler Language mov cash, temp sub cost, temp sub tax, temp mov temp, changeOne operator, two operands per statement

  • Close with some pretty pictures

  • Inside the caseb. Processorc. PCI slotse. Memory slots

  • Motherboard

  • ProcessorPentium III Xeon

  • MemoryRAMDRAMSRAMROMVolatile / Non-VolatileMagnetic

  • Hard Drive

  • Cathode Ray Tube CRTCathodeDeflection platesScreen covered with PhosphorElectron Beam

  • Mouse

  • End of Lecture 1


Recommended