Post on 13-Dec-2015
11st Semester 2006
Introduction to Introduction to Computer and ProgrammingComputer and Programming
Computer Engineering DepartmentComputer Engineering DepartmentKasetsart University, Bangkok, Kasetsart University, Bangkok,
THAILANDTHAILAND
21st Semester 2006
Instructor InformationInstructor Information
Instructor: Instructor: สิ�ทธิ�ชั�ย ศรี�อ่ อ่น สิ�ทธิ�ชั�ย ศรี�อ่ อ่น (Sitichai (Sitichai Srioon)Srioon)
Email Address: Email Address: fengsis@ku.ac.thfengsis@ku.ac.th Website: Website: http://www.cpe.ku.ac.th/~scshttp://www.cpe.ku.ac.th/~scs Office: Building 15 (Computer Office: Building 15 (Computer
Engineering Building) Room 414Engineering Building) Room 414 TA (Teaching Assistant): Will be TA (Teaching Assistant): Will be
announcedannounced
31st Semester 2006
OutlineOutline
Introduction to ComputerIntroduction to Computer Programming LanguagesProgramming Languages How to Run a ProgramHow to Run a Program
41st Semester 2006
Computer CategoriesComputer Categories
Personal Computer (PC)Personal Computer (PC) Desktop ComputerDesktop Computer Notebook (Laptop)Notebook (Laptop) PDA – Personal Digital Assistant PDA – Personal Digital Assistant
(Palmtop) (Palmtop)
High Computation Power ComputerHigh Computation Power Computer WorkstationWorkstation Supercomputer Supercomputer Mainframe Mainframe
51st Semester 2006
What is a Computer?What is a Computer?
Computer is a device with Computer is a device with sophisticated electronic parts thatsophisticated electronic parts that operates under the control of operates under the control of
instructions (software) that is stored in instructions (software) that is stored in its own memory,its own memory,
accepts data (input),accepts data (input), manipulates data (process),manipulates data (process), and then produces information (output) and then produces information (output)
from the processing unitfrom the processing unit
61st Semester 2006
Computer ComponentsComputer Components Input DevicesInput Devices Output DevicesOutput Devices Computing & Processing UnitComputing & Processing Unit Storage DevicesStorage Devices
71st Semester 2006
CPU
MainMemory
Input Devices
HD
Secondary Memory
Output Devices
Computer ComponentsComputer Components
81st Semester 2006
Computer ComponentsComputer Components
Printer (output)
Scanner
(input)
Mouse (input)Keyboard
(input)
Speaker (output)
Monitor (output)
CD, Hard disk(Storage)
System unit(processor, memory…)
91st Semester 2006
Application SoftwareApplication Software Consists of programs that tell a Consists of programs that tell a
computer how to produce computer how to produce informationinformation
Some examples:Some examples: Word processing Word processing Electronic spreadsheetElectronic spreadsheet Database Database Presentation graphicsPresentation graphics
101st Semester 2006
Other ApplicationsOther Applications
Computer-Aided DesignFinite Element Analysis
Graphing Tool
111st Semester 2006
Computer MemoryComputer Memory
I - Main MemoryI - Main Memory II - Secondary II - Secondary
MemoryMemory
CPU
MainMemory
121st Semester 2006
I - Main MemoryI - Main Memory
Can be separated into 2 CategoriesCan be separated into 2 Categories RAM (Random Access Memory)RAM (Random Access Memory) ROM (Read Only Memory)ROM (Read Only Memory)
Memory Cell -> Byte -> BitMemory Cell -> Byte -> Bit 1 byte = 8 bits1 byte = 8 bits
131st Semester 2006
II - Secondary MemoryII - 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…Etc…
1 KB (KiloBytes) = 21 KB (KiloBytes) = 210 10 = 1024 bytes= 1024 bytes
1 MB (MegaBytes) = 21 MB (MegaBytes) = 22020 = 1,048,576 bytes = 1,048,576 bytes
1 GB (GigaBytes) = 21 GB (GigaBytes) = 23030 = 1,073,741,824 bytes = 1,073,741,824 bytes
141st Semester 2006
Main MemoryMain MemoryVS Secondary MemoryVS Secondary Memory
Main MemoryMain MemoryMuch fasterMuch fasterMore More
expensiveexpensiveVolatileVolatile
Secondary MemorySecondary MemorySlowerSlowerLess expensiveLess expensivePermanent (Non-Volatile)Permanent (Non-Volatile)
151st Semester 2006
Computer Components Computer Components (Revisit)(Revisit)
Computer SpecificationComputer Specification IntelIntel®® Pentium Pentium®® D Processors 820 Dual D Processors 820 Dual
Core Core ((2x1MB L2 cache, 800MHz FSB2x1MB L2 cache, 800MHz FSB)) Genuine Windows Genuine Windows®® XP Professional XP Professional Up to 4 Up to 4 GB of GB of 533533 MHz Dual Channel Share MHz Dual Channel Share
dd22 DDR DDR22 SDRAM SDRAM IntelIntel®® Graphics Media Accelerator Graphics Media Accelerator 950 950 (G(G
MAMA950)950) Integrated Broadcom Integrated Broadcom®® Gigabit Gigabit44 LOM (LAN LOM (LAN
on Motherboard) on Motherboard)
161st Semester 2006
OutlineOutline
Introduction to ComputerIntroduction to Computer Programming LanguagesProgramming Languages How to Run a ProgramHow to Run a Program
171st Semester 2006
Programming LanguagesProgramming Languages
Machine LanguageMachine Language Assembly LanguageAssembly Language High-Level LanguageHigh-Level Language
181st Semester 2006
High-level vs AssemblyHigh-level vs Assemblyvs Machine Languagevs Machine Language
High-level LanguageHigh-level Language
Assembly LanguageAssembly Language
Machine LanguageMachine Language
SUM = A * 2 + ALPHA/3; SUM = A * 2 + ALPHA/3; SUM = A * 2 + ALPHA/3; SUM = A * 2 + ALPHA/3;
MULL3MULL3 A, #2, AXA, #2, AXDIVL3DIVL3 #3, ALPHA, BX#3, ALPHA, BXADDL3ADDL3 AX, BX, SUMAX, BX, SUM
MULL3MULL3 A, #2, AXA, #2, AXDIVL3DIVL3 #3, ALPHA, BX#3, ALPHA, BXADDL3ADDL3 AX, BX, SUMAX, BX, SUM
000110000110001100001100011001111000110011111001100011110011000111
000110000110001100001100011001111000110011111001100011110011000111
191st Semester 2006
High-Level LanguagesHigh-Level Languages Procedural LanguageProcedural Language
FortranFortran CobolCobol BasicBasic CC PascalPascal
Object-Oriented Language Object-Oriented Language C++C++ JavaJava C#C#
Functional LanguageFunctional Language LispLisp
Logic LanguageLogic Language PrologProlog
201st Semester 2006
TranslatorsTranslators
LanguageLanguage TranslatorTranslator
AssemblyAssembly AssemblerAssembler
High-LevelHigh-LevelLanguagesLanguages
CompilersCompilers
211st Semester 2006
Translation Process Translation Process (C#)(C#)
CompilerCompiler(on computer)(on computer)
InputInput
Output
prog.csSource fileSource file
prog.exeExecutable fileExecutable file
221st Semester 2006
OutlineOutline
Introduction to ComputerIntroduction to Computer Programming LanguagesProgramming Languages How to Run a ProgramHow to Run a Program
231st Semester 2006
How to run program?How to run program?
After boot ProcessAfter boot Process May be Windows XP (Operating May be Windows XP (Operating
System) has been loaded into Main System) has been loaded into Main MemoryMemory
User tell OS to load program User tell OS to load program progprog OS Load program OS Load program progprog from the from the
hard disk hard disk into the memoryinto the memory
OS run program from the memoryOS run program from the memory
241st Semester 2006
SummarySummary
Computer BasicComputer Basic Programming LanguageProgramming Language Running a ProgramRunning a Program
251st Semester 2006
To DoTo Do
Add yourself on M@xLearnAdd yourself on M@xLearn Go to Go to http://course.ku.ac.thhttp://course.ku.ac.th Section 5Section 5 Instructor: Instructor: Sitichai SrioonSitichai Srioon
Upload your pictureUpload your picture
261st Semester 2006
Questions?Questions?