2 nd Semester 2004 1 Module1 Introduction to Computer and Programming อภิรักษ์...
-
Upload
darrell-norris -
Category
Documents
-
view
222 -
download
0
description
Transcript of 2 nd Semester 2004 1 Module1 Introduction to Computer and Programming อภิรักษ์...
12nd Semester 2004
Module1Module1Introduction to Introduction to
Computer and ProgrammingComputer and Programming
อภิรกัษ์ จนัทรส์รา้งAphirak Jansang
[email protected]://www.cpe.ku.ac.th/~aphirak
Computer Engineering DepartmentKasetsart University, Bangkok THAILAND
21st Semester 2005
Outline
Introduction to Computer How to run program? Programming Languages
31st Semester 2005
Do you know? How many computers in THAILANDTHAILAND?
*http://www.nso.go.th/eng/indicators/core_e.htm*http://www.nso.go.th/eng/indicators/core_e.htm
1998 1999 2000 2001 2002
41st Semester 2005
How can we classify computers?
Personal Computer Desktop Computer Notebook PDA – Personal Digital Assistant
Supercomputer Mainframe High Computation Power
51st Semester 2005
Computer Components
Input Devices Output Devices Computing & Processing Unit
61st Semester 2005
CPU
MainMemory
Input Devices
HD
Secondary Memory
Output Devices
Computer Components
71st Semester 2005
Computer Memory
1.Main Memory 2.Secondary Memory
81st Semester 2005
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
91st Semester 2005
2. Secondary Memory
Floppy disk Hard disk CDROM DVDROMEtc…
1 Kbyte = 210 = 1024 bytes1 Mbyte = 220 = 1,048,576 bytes
1 Gbyte = 230 = 1,073,741,824 bytes
101st Semester 2005
Main Memory VS Secondary Memory
Main MemoryMuch fasterMore
expensiveVolatile
Secondary MemorySlowerLess expensivePermanent
111st Semester 2005
Do you know ASIMO?
*http://world.honda.com/ASIMO/*http://world.honda.com/ASIMO/
121st Semester 2005
Outline
Introduction to Computer How to run program? Programming Languages Introduction to Pascal Language
131st Semester 2005
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
141st Semester 2005
Outline
Introduction to Computer How to run program? Programming Languages
151st Semester 2005
Programming Languages
Machine Language Assembly Language High-Level Language
161st Semester 2005
High-level VS Assembly VS Machine Language
High-level LanguageSUM := A * 2 + ALPHA/3;
Assembly LanguageMULL3 A, #2, R6
DIVL3 #3, ALPHA, R7ADDL3 R6, R7, SUM
Machine Language0001100001100011001111 10011000111
171st Semester 2005
High-Level Languages Procedural Language
Fortran Cobol Basic C Pascal
Object-Oriented Language C++ Java C#C#
Functional Language Lisp
Logic Language Prolog
181st Semester 2005
How to execute program from non-machine language?
Interpretation Method Translation Method
191st Semester 2005
Interpretation Method Process
InterpreterInterpreter(on computer)(on computer)
OutputSource ProgramSource ProgramSource Program
Input
201st Semester 2005
Translation Method Process
TranslatorTranslator(on computer)(on computer)
File *.exe
Source ProgramSource ProgramSource Program
Input
211st Semester 2005
Translators
Assembler (assembly) Compiler (High-level language)
221st Semester 2005
Quiz1 Quiz1 What will happen What will happen
to you when to you when our world have our world have no computers?no computers?
231st Semester 2005
Summary
Computer Basic Programming Language
Interpreter Method Translator Method