Unformatted text preview:

COMP 14 Introduction to Programming…from Last TimeToday (ch. 1)Reading Check-UpAn Overview of the History of ComputersHardware vs. SoftwareHardware OrganizationCentral Processing UnitMain MemoryMain Memory With 100 CellsCPU and Main MemorySecondary StorageSlide 13Input DevicesOutput DevicesInput/Output DevicesHardware ComponentsOpening MS WordQuestionsSoftware CategoriesOperating System (OS)Application ProgramsSlide 23It’s All About DataAnalog vs. DigitalRepresenting Text DigitallyLanguage of a ComputerBit PermutationsSlide 29Binary NumbersConverting Decimal to BinaryQuestions: Binary NumbersStorage CapacityMachine LanguageAssembly and Machine LanguageProgramming LanguagesJava and Machine LanguageCompilerA Java ProgramProcessing a Java ProgramProblem SolvingAlgorithmProblem-Analysis-Coding-ExecutionAlgorithm Design ExampleResulting AlgorithmExerciseTo doWhat’s Ahead...The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian IlieCOMP 14Introduction to ProgrammingAdrian IlieJune 24, 2005The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie2…from Last Time•Homework 1 due at midnight♦Fill in form with personal info♦Getting started with jGRASP♦Compile and Run test programs♦Any problems?♦Disable test for new versionsThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie3Today (ch. 1)•Parts of the computer♦hardware vs. software♦CPU and memory•Binary numbers•What is an algorithm?The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie4________- computer components including the CPU, main memory, I/O devices, and secondary storage________ - the brain of the computer, containing the CU, PC, IR, ALU, and ACC________ - computer instructions to solve a problemThe digits 0 and 1 are called _________or the shortened term ________Reading Check-UphardwareCPUprogrambinary digitsbitsThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie5An Overview of the History of Computers•1950s: Very large devices available to a select few. •1960s: Large corporations owned computers.•1970s: Computers got smaller and cheaper.•1990s: Computers got cheaper and faster and were found in most homes.The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie6Hardware vs. SoftwareA computer is made up of hardware and softwareHardwareSoftware• CPU- ex: 2 GHz Pentium IV• input/output- keyboard- monitor- network card• main memory- ex: 256 MB RAM• secondary memory- ex: 20 GB hard drive• operating systems- Windows XP- Mac OS X• applications- games- Microsoft Word- Internet ExplorerThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie7Hardware OrganizationmotherboardCPUmemoryhard driveThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie8Central Processing Unit•Control Unit (CU)♦"the brain" of the CPU•Program Counter (PC)♦points to the next instruction to be executed•Instruction Register (IR)♦holds the currently executing instruction•Arithmetic Logic Unit (ALU)♦carries out all arithmetic and logical ops•Accumulator (ACC)♦holds the results of the operations performed by the ALUThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie9Main Memory•Ordered sequence of cells•AKA Random Access Memory (RAM)•Directly connected to the CPU•All programs must be brought into main memory before execution•When power is turned off, everything in main memory is lostThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie10Main MemoryWith 100 CellsEach memory cell has a numeric address, which uniquely identifies itThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie11CPU and Main MemoryChip that executesprogram instructions(processor)Primary storage areafor programs and datathat are in active use(RAM)All programs must be brought into main memory before executionThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie12Secondary Storage•Provides permanent storage for information•Retains information even when power is off•Examples of secondary storage:♦Hard Disks♦Floppy Disks♦ZIP Disks♦CD-ROMs♦TapesThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie13Secondary StorageSecondary memorydevices providelong-term storageInformation is movedbetween main memoryand secondary memoryas neededThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie14Input Devices•Definition: devices that feed data and computer programs into computers•Examples:♦Keyboard♦Mouse♦Secondary StorageThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie15Output Devices•Definition: devices that the computer uses to display results•Examples:♦Printer♦Monitor♦Secondary StorageThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie16Input/Output DevicesI/O devices facilitateuser interactionThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie17Hardware ComponentsThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie18Opening MS Word•Use the mouse to select MS Word•The CPU requests the MS Word application•MS Word is loaded from the hard drive to main memory•The CPU reads instructions from main memory and executes them one at a time•MS Word is displayed on your monitorThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie19Questions ____________- points to the next instruction to be executed ____- a unique location in memory ____________- stores information permanentlyInstructions executed by the CPU must be first loaded to ________program counter (PC)addresssecondary storagemain memoryThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie20Software Categories•Operating System♦controls all machine activities♦provides the user interface to the computer♦first program to load when a computer is turned on♦manages computer resources, such as the CPU, memory, and hard drive♦examples: Windows XP, Linux, Mac OS X•Application♦generic term for any other kind of software♦examples: word processors, missile control systems, gamesThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie21Operating System (OS)•OS monitors overall activity of the computer and provides services•Written using programming language•Example services:♦memory management♦input/output♦storage managementThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie22Application Programs•Written using programming languages•Perform a specific task•Run by the OS•Example programs:♦Word Processors♦Spreadsheets♦GamesThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian


View Full Document

UNC-Chapel Hill COMP 14 - LECTURE NOTES

Download LECTURE NOTES
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view LECTURE NOTES 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?