2 nd Semester Module1 Introduction to Computer and Programming อภิรักษ์ จันทร์สร้าง Aphirak Jansang Computer Engineering Department Kasetsart University, Bangkok THAILAND
1 st Semester Outline Introduction to Computer How to run program? Programming Languages
1 st Semester Do you know? THAILAND How many computers in THAILAND? *
1 st Semester How can we classify computers? Personal Computer Desktop Computer Notebook PDA – Personal Digital Assistant Supercomputer Mainframe High Computation Power
1 st Semester Computer Components Input Devices Output Devices Computing & Processing Unit
1 st Semester CPU Main Memory Input Devices HD Secondary Memory Output Devices Computer Components
1 st Semester Computer Memory 1.Main Memory 2.Secondary Memory
1 st Semester Main Memory Can be devided into 2 Categories RAM (Random Access Memory) ROM (Read Only Memory) Memory Cell -> Byte -> Bit 1 Byte = 8 bits
1 st Semester Secondary Memory Floppy disk Hard disk CDROM DVDROM Etc… 1 Kbyte = 2 10 = 1024 bytes 1 Mbyte = 2 20 = 1,048,576 bytes 1 Gbyte = 2 30 = 1,073,741,824 bytes
1 st Semester Main Memory VS Secondary Memory Main Memory Much faster More expensive Volatile Secondary Memory Slower Less expensive Permanent
1 st Semester Do you know ASIMO? *
1 st Semester Outline Introduction to Computer How to run program? Programming Languages Introduction to Pascal Language
1 st Semester 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
1 st Semester Outline Introduction to Computer How to run program? Programming Languages
1 st Semester Programming Languages Machine Language Assembly Language High-Level Language
1 st Semester High-level VS Assembly VS Machine Language High-level Language SUM := A * 2 + ALPHA/3; Assembly Language MULL3A, #2, R6 DIVL3#3, ALPHA, R7 ADDL3R6, R7, SUM Machine Language
1 st Semester High-Level Languages Procedural Language Fortran Cobol Basic C Pascal Object-Oriented Language C++ Java C# C# Functional Language Lisp Logic Language Prolog
1 st Semester How to execute program from non-machine language? Interpretation Method Translation Method
1 st Semester Interpretation Method Process Interpreter (on computer) Output Source Program Input
1 st Semester Translation Method Process Translator (on computer) File *.exe Source Program Input
1 st Semester Translators Assembler (assembly) Compiler (High-level language)
1 st Semester Quiz1 What will happen to you when our world have no computers?
1 st Semester Summary Computer Basic Programming Language Interpreter Method Translator Method