90 likes | 156 Views
CS 0008 Day 2. Today. Hardware and Software How computers store data How a program works Operators, types, input Print function Running the debugger. Hardware. Physical devices; components
E N D
Today • Hardware and Software • How computers store data • How a program works • Operators, types, input • Print function • Running the debugger
Hardware • Physical devices; components • CPU – central processing unit. Actually runs the program. Today: microprocessors which fit on a single chip • Main memory – stores the program currently being executed and the data. E.g., your Python program and its variables; text editor and the document you are editing • Random Access Memory – volatile – when the power is turned off, contents are erased • 1 • 1 • 1
Hardware • Secondary storage – holds data even when the power is turned off. Programs and documents you are saving are stored in secondary storage, and loaded into Main Memory as needed. Common: disk drive. • Input devices – keyboard, mouse, scanner, microphone, sensors, etc. • Output devices – video display, printers, etc. • 1 • 1 • 1
Software Programs; code • System software vs application software
System Software • Controls and manages the computer • Users typically do not modify it • Operating system – fundamental! Controls everything. Arranges for data and programs to be loaded into Main Memory; arranges for programs to be run; manages I/O devices; etc. • Linux, Mac OS, Windows are operating systems
Application Software • Editors, powerpoint, spreadsheet programs, email programs, web browers, email programs, programs to calculate financial information, etc!
How Computers Store Data • All information is converted into strings of 0s and 1s (really!) • Bit – binary digit; 1/0; on/off • Byte – 8 bits • Storing numbers and letters (on the board)
How a program works • On the board • Then, back to Python