1 st Semester Introduction to Computer and Programming Computer Engineering Department Kasetsart University, Bangkok, THAILAND
1 st Semester Instructor Information Instructor: สิทธิชัย ศรีอ่อน (Sitichai Srioon) Instructor: สิทธิชัย ศรีอ่อน (Sitichai Srioon) Address: Address: Website: Website: Office: Building 15 (Computer Engineering Building) Room 414 Office: Building 15 (Computer Engineering Building) Room 414 TA (Teaching Assistant): Will be announced TA (Teaching Assistant): Will be announced
1 st Semester Outline Introduction to Computer Introduction to Computer Programming Languages Programming Languages How to Run a Program How to Run a Program
1 st Semester Computer Categories Personal Computer (PC) Personal Computer (PC) Desktop Computer Desktop Computer Notebook (Laptop) Notebook (Laptop) PDA – Personal Digital Assistant (Palmtop) PDA – Personal Digital Assistant (Palmtop) High Computation Power Computer High Computation Power Computer Workstation Workstation Supercomputer Mainframe Supercomputer Mainframe
1 st Semester What is a Computer? Computer is a device with sophisticated electronic parts that Computer is a device with sophisticated electronic parts that operates under the control of instructions (software) that is stored in its own memory, operates under the control of instructions (software) that is stored in its own memory, accepts data (input), accepts data (input), manipulates data (process), manipulates data (process), and then produces information (output) from the processing unit and then produces information (output) from the processing unit
1 st Semester Computer Components Input Devices Input Devices Output Devices Output Devices Computing & Processing Unit Computing & Processing Unit Storage Devices Storage Devices
1 st Semester CPU Main Memory Input Devices HD Secondary Memory Output Devices Computer Components
1 st Semester Computer Components Printer (output) Scanner (input) Mouse (input) Keyboard (input) Speaker (output) Monitor (output) CD, Hard disk (Storage) System unit (processor, memory … )
1 st Semester Application Software Consists of programs that tell a computer how to produce information Consists of programs that tell a computer how to produce information Some examples: Some examples: Word processing Word processing Electronic spreadsheet Electronic spreadsheet Database Database Presentation graphics Presentation graphics
1 st Semester Other Applications Computer-Aided Design Finite Element Analysis Graphing Tool
1 st Semester Computer Memory I - Main Memory I - Main Memory II - Secondary Memory II - Secondary Memory CPU Main Memory
1 st Semester I - Main Memory Can be separated into 2 Categories Can be separated into 2 Categories RAM (Random Access Memory) RAM (Random Access Memory) ROM (Read Only Memory) ROM (Read Only Memory) Memory Cell -> Byte -> Bit Memory Cell -> Byte -> Bit 1 byte = 8 bits 1 byte = 8 bits
1 st Semester II - Secondary Memory Floppy disk (1.44 MB) Floppy disk (1.44 MB) Hard disk (80 GB, 100 GB) Hard disk (80 GB, 100 GB) CD-ROM (700 MB)/DVD-ROM (4.7/8.5 GB) CD-ROM (700 MB)/DVD-ROM (4.7/8.5 GB) Flash Memory (Compact Flash, MMC, SD) Flash Memory (Compact Flash, MMC, SD)Etc… 1 KB (KiloBytes) = 2 10 = 1024 bytes 1 MB (MegaBytes) = 2 20 = 1,048,576 bytes 1 GB (GigaBytes) = 2 30 = 1,073,741,824 bytes
1 st Semester Main Memory VS Secondary Memory Main Memory Main Memory Much faster Much faster More expensive More expensive Volatile Volatile Secondary Memory Slower Less expensive Permanent (Non-Volatile)
1 st Semester Computer Components (Revisit) Computer Specification Computer Specification Intel® Pentium® D Processors 820 Dual Core (2x1MB L2 cache, 800MHz FSB) Intel® Pentium® D Processors 820 Dual Core (2x1MB L2 cache, 800MHz FSB) Genuine Windows® XP Professional Genuine Windows® XP Professional Up to 4 GB of 533MHz Dual Channel Shared2 DDR2 SDRAM Up to 4 GB of 533MHz Dual Channel Shared2 DDR2 SDRAM Intel® Graphics Media Accelerator 950 (GMA950) Intel® Graphics Media Accelerator 950 (GMA950) Integrated Broadcom® Gigabit4 LOM (LAN on Motherboard) Integrated Broadcom® Gigabit4 LOM (LAN on Motherboard)
1 st Semester Outline Introduction to Computer Introduction to Computer Programming Languages Programming Languages How to Run a Program How to Run a Program
1 st Semester Programming Languages Machine Language Machine Language Assembly Language Assembly Language High-Level Language High-Level Language
1 st Semester High-level vs Assembly vs Machine Language High-level Language High-level Language Assembly Language Assembly Language Machine Language Machine Language SUM = A * 2 + ALPHA/3; MULL3A, #2, AX DIVL3#3, ALPHA, BX ADDL3AX, BX, SUM MULL3A, #2, AX DIVL3#3, ALPHA, BX ADDL3AX, BX, SUM
1 st Semester High-Level Languages Procedural Language Procedural Language Fortran Fortran Cobol Cobol Basic Basic C Pascal Pascal Object-Oriented Language Object-Oriented Language C++ C++ Java Java C# C# Functional Language Functional Language Lisp Lisp Logic Language Logic Language Prolog Prolog
1 st Semester Translators LanguageTranslator AssemblyAssembler High-Level Languages Compilers
1 st Semester Translation Process (C#) Compiler (on computer) Input Output prog.cs Source file prog.exe Executable file
1 st Semester Outline Introduction to Computer Introduction to Computer Programming Languages Programming Languages How to Run a Program How to Run a Program
1 st Semester How to run program? After boot Process After boot Process May be Windows XP (Operating System) has been loaded into Main Memory May be Windows XP (Operating System) has been loaded into Main Memory User tell OS to load program prog User tell OS to load program prog OS Load program prog from the hard disk into the memory OS Load program prog from the hard disk into the memory OS run program from the memory OS run program from the memory
1 st Semester Summary Computer Basic Computer Basic Programming Language Programming Language Running a Program Running a Program
1 st Semester To Do Add yourself on Add yourself on Go to Go to Section 5 Section 5 Instructor: Sitichai Srioon Instructor: Sitichai Srioon Upload your picture Upload your picture
1 st Semester Questions?