Transcript ภาพนิ่ง 1
Introduction to Computers… • We will learn : • Components of Computer: Hardware vs Software. • Components of Hardware: CPU, Memory, Storage, Input/Output Devices. • Components of Software: Operating System and Application Programs. • STORAGE structure. 1 The Big Picture A computer system contains: • hardware (equipment) • software (programs) • people (programmers and end-users) 2 Hardware: The Physical Components of a Computer Secondary storage device data stores and programs Input device Sends data to the central processi ng unit Input Secondary storage Central processing unit (CPU) executes computer instructions memory data and holds programs temporarily Process Output device makes processed data (informati on) available Output 3 A computer is a machine that can be programmed to • accept data • process it into useful information • store it away for safekeeping and later use 4 Processing Unit Processing Unit is composed of • Central Processing Unit (CPU) that executes program. • Main Memory that stores program and data. 5 6 Main Memory: Structure • Ordered sequence of storage locations called memory cells. • Each memory cell is identified by a unique address. • The data stored in a memory cell is its content. • One can either read a memory cell or write to a memory cell. 7 Main Memory: Data Representation in Memory Cells • Data represented as binary numbers (i.e. base 2) which are collections of 1s and 0s. • Here 1 and 0 correspond to two different levels of voltage in electrical implementation of the memory. For example: 0 0 Volts 8 Main Memory: Operatio REA D CP U WRIT E CP U Addr essData MEMO RY Addr ess Data MEMO RY 9 Main Memory: Memory Sizes 1 byte = 8 bits. 10 1 kilobyte = 2 or 1024 bytes. 1 Megabyte = 220 or 1,0548,786 bytes. 30 1 Gigabyte = 2 or 1,073,741,824 bytes. Typical PC Main Memory is 10 Storage • Primary storage (or memory) holds programs and data temporarily: Main Memory. • Secondary storage devices such as disks store data and programs. 11 Secondary Storage • Secondary storage has more size than Main Memory (i.e. Primary Memory). • It is non-volatile, when you power down the computer data is not lost. • We use secondary storage to store our programs and data that we want to save. 12 Software: Telling the Machine What to Do • Software - the planned, stepby-step set of instructions required to turn data into information. • Divided principally into systems and applications. 13 • • • • Hardware & Software: Structure Hardware Operating System Application Programs User 14 Software: Operating System • Controls the interaction of the computer with its environment (including user). • Management of memory, processor time and other resources for various tasks. • Execute and provide services for applications. 15 Software: Applications Software • Programs designed to perform specific tasks and functions. Examples: Matlab, Excel, Microsoft Word, and many more…. • Often found in the mass market as • packaged software or 16 Software: Organization (Files, Folders, Drives, Path) • Your computer’s filing system has three basic divisions: files, folders and drives • Everything saved on your computer is stored as a file • You can store a file in a folder (called “directory” under UNIX), and in turn store that folder inside another folder. Your computer also stores files in folders. When computer needs one of those files, it 17 Software Organization Disk Drive Files Fold ers Files Fold ers Files Fold ers 18 Software:Organization Examples • Disk Drives under My Computer (Windows) 19 Software: Organization Examples • Example CD-ROM Drive Contents: Files and Folders 20 Software : Organization Examples • Example Folder (A folder of the CD-ROM in the previous slide.) 21 22 Programming Languages • A programming language is a set of rules that provides a way of telling a computer what operations to perform. • There are several levels (or “generations”) of programming languages: • High-level 23 High-Level Language • High-level languages use English-like words that are much easier for humans to understand. • A translator is needed to convert the high-level language into machine language that computers understand. • There are several languages that you can use 24 Assembly Language • Assembly languages are written using mnemonic codes and assemblers replace mnemonic codes with 0s and 1s to create machine code. • Since machine language is the only language the computer can execute, 25 Machine Language • This is the lowest level of programming language because it represents data and program instructions as 0s and 1s. • All programs written in different programming languages are eventually 26 Example for a = a + b 27 Compiler, linker, Source File loader… Comp (Text) iler Libra Other Object ry Files (binary) Object File (binary) Linker Executable File (binary) Loa der Inpu t Resu lts 28