Unformatted text preview:

COMP 14 Introduction to Programming Adrian Ilie June 24 2005 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL 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 versions 2 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Today ch 1 Parts of the computer hardware vs software CPU and memory Binary numbers What is an algorithm 3 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Reading Check Up hardware computer components including the CPU main memory I O devices and secondary storage CPU the brain of the computer containing the CU PC IR ALU and ACC program computer instructions to solve a problem binary digits The digits 0 and 1 are called bits or the shortened term 4 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL An 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 5 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Hardware vs Software A computer is made up of hardware and software 6 Hardware Software 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 Adrian Ilie applications games Microsoft Word Internet Explorer The UNIVERSITY of NORTH CAROLINA at CHAPEL Hardware Organization CPU memory motherboard hard drive 7 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Central 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 ALU 8 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Main 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 lost 9 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Main Memory With 100 Cells Each memory cell has a numeric address which uniquely identifies it 10 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL CPU and Main Memory All programs must be brought into main memory before execution Chip that executes program instructions processor Primary storage area for programs and data that are in active use RAM 11 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Secondary Storage Provides permanent storage for information Retains information even when power is off Examples of secondary storage 12 Hard Disks Floppy Disks ZIP Disks CD ROMs Tapes Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Secondary Storage Secondary memory devices provide long term storage Information is moved between main memory and secondary memory as needed 13 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Input Devices Definition devices that feed data and computer programs into computers Examples Keyboard Mouse Secondary Storage 14 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Output Devices Definition devices that the computer uses to display results Examples Printer Monitor Secondary Storage 15 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Input Output Devices I O devices facilitate user interaction 16 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Hardware Components 17 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Opening 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 monitor 18 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Questions program counter points PC to the next instruction to be executed a unique location in memory address stores information secondary storage permanently Instructions executed by the CPU must be first loaded tomain memory 19 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Software 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 games 20 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Operating System OS OS monitors overall activity of the computer and provides services Written using programming language Example services memory management input output storage management 21 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Application Programs Written using programming languages Perform a specific task Run by the OS Example programs Word Processors Spreadsheets Games 22 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Questions Classify the following pieces of software as operating system or application 1 2 3 4 23 Microsoft Windows 2000 OS app Microsoft PowerPoint Linux OS Your COMP 14 programs app Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL It s All About Data Software is data numbers characters instructions programs Hardware stores and processes data read write add subtract multiply divide 24 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Analog vs Digital Analog continuous wave forms ex sound music on an audio tape Digital the information is broken down into pieces and each piece is represented separately is ultimately represented as series of 0s and 1s for low voltage and high voltage can be copied exactly ex music on a compact disc 25 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Representing Text Digitally All information in a computer is digitized broken down and represented as numbers Hi 72 105 44 32 72 Heather 101 97 116 104 101 114 46 Corresponding upper and lower case letters are separate characters 26 Adrian Ilie The UNIVERSITY of NORTH CAROLINA at CHAPEL Language of a Computer Machine language the most basic language of a computer A sequence of 0s and 1s binary digit or bit sequence of 8 bits is called a byte Every computer directly understands its own


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 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?