230 likes | 405 Views
Module1 Introduction to Computer and Programming. อภิรักษ์ จันทร์สร้าง Aphirak Jansang aphirak.j@ku.ac.th http://www.cpe.ku.ac.th/~aphirak Computer Engineering Department Kasetsart University, Bangkok THAILAND. Outline. Introduction to Computer How to run program? Programming Languages.
E N D
Module1Introduction to Computer and Programming อภิรักษ์ จันทร์สร้างAphirak Jansang aphirak.j@ku.ac.th http://www.cpe.ku.ac.th/~aphirak Computer Engineering Department Kasetsart University, Bangkok THAILAND
Outline • Introduction to Computer • How to run program? • Programming Languages
2002 1998 1999 2000 2001 Do you know? • How many computers in THAILAND? *http://www.nso.go.th/eng/indicators/core_e.htm
How can we classify computers? • Personal Computer • Desktop Computer • Notebook • PDA – Personal Digital Assistant • Supercomputer Mainframe • High Computation Power
Computer Components • Input Devices • Output Devices • Computing & Processing Unit
Secondary Memory Main Memory HD CPU Output Devices Input Devices Computer Components
Computer Memory • 1.Main Memory • 2.Secondary Memory
1. Main Memory • Can be devided into 2 Categories • RAM (Random Access Memory) • ROM (Read Only Memory) • Memory Cell -> Byte -> Bit • 1 Byte = 8 bits
2. Secondary Memory • Floppy disk • Hard disk • CDROM • DVDROM Etc… 1 Kbyte = 210 = 1024 bytes 1 Mbyte = 220 = 1,048,576 bytes 1 Gbyte = 230 = 1,073,741,824 bytes
Main Memory Much faster More expensive Volatile Secondary Memory Slower Less expensive Permanent Main Memory VS Secondary Memory
Do you know ASIMO? *http://world.honda.com/ASIMO/
Outline • Introduction to Computer • How to run program? • Programming Languages • Introduction to Pascal Language
How to run program? • After boot Process • May be Windows XP (Operating System: OS) has been loaded into Main Memory • User tell OS to load program P1 • OS Load program P1 from Secondary Memory into Main Memory • OS run program from Main Memory
Outline • Introduction to Computer • How to run program? • Programming Languages
Programming Languages • Machine Language • Assembly Language • High-Level Language
High-level VS Assembly VS Machine Language • High-level Language SUM := A * 2 + ALPHA/3; • Assembly Language MULL3 A, #2, R6 DIVL3 #3, ALPHA, R7 ADDL3 R6, R7, SUM • Machine Language 00011000011 00011001111 10011000111
High-Level Languages • Procedural Language • Fortran • Cobol • Basic • C • Pascal • Object-Oriented Language • C++ • Java • C# • Functional Language • Lisp • Logic Language • Prolog
How to execute program from non-machine language? • Interpretation Method • Translation Method
Input Source Program Source Program Source Program Output Interpretation Method Process Interpreter (on computer)
Input Source Program Source Program Source Program File *.exe Translation Method Process Translator (on computer)
Translators • Assembler (assembly) • Compiler (High-level language)
Quiz1 What will happen to you when our world have no computers?
Summary • Computer Basic • Programming Language • Interpreter Method • Translator Method