Module1 Introduction to Computer and Programming
-
Upload
reuben-bishop -
Category
Documents
-
view
24 -
download
1
description
Transcript of Module1 Introduction to Computer and Programming
![Page 1: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/1.jpg)
1
2nd 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
![Page 2: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/2.jpg)
2
1st Semester 2005
Outline
Introduction to Computer How to run program? Programming Languages
![Page 3: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/3.jpg)
3
1st 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
![Page 4: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/4.jpg)
4
1st Semester 2005
How can we classify computers?
Personal Computer Desktop Computer Notebook PDA – Personal Digital Assistant
Supercomputer Mainframe High Computation Power
![Page 5: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/5.jpg)
5
1st Semester 2005
Computer Components
Input Devices Output Devices Computing & Processing Unit
![Page 6: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/6.jpg)
6
1st Semester 2005
CPU
MainMemory
Input Devices
HD
Secondary Memory
Output Devices
Computer Components
![Page 7: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/7.jpg)
7
1st Semester 2005
Computer Memory
1.Main Memory 2.Secondary Memory
![Page 8: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/8.jpg)
8
1st 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
![Page 9: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/9.jpg)
9
1st 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
![Page 10: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/10.jpg)
10
1st Semester 2005
Main Memory VS Secondary Memory
Main MemoryMuch fasterMore
expensiveVolatile
Secondary MemorySlowerLess expensivePermanent
![Page 11: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/11.jpg)
11
1st Semester 2005
Do you know ASIMO?
*http://world.honda.com/ASIMO/*http://world.honda.com/ASIMO/
![Page 12: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/12.jpg)
12
1st Semester 2005
Outline
Introduction to Computer How to run program? Programming Languages Introduction to Pascal Language
![Page 13: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/13.jpg)
13
1st 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
![Page 14: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/14.jpg)
14
1st Semester 2005
Outline
Introduction to Computer How to run program? Programming Languages
![Page 15: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/15.jpg)
15
1st Semester 2005
Programming Languages
Machine Language Assembly Language High-Level Language
![Page 16: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/16.jpg)
16
1st 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
![Page 17: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/17.jpg)
17
1st 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
![Page 18: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/18.jpg)
18
1st Semester 2005
How to execute program from non-machine language?
Interpretation Method Translation Method
![Page 19: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/19.jpg)
19
1st Semester 2005
Interpretation Method Process
InterpreterInterpreter(on computer)(on computer)
OutputSource ProgramSource ProgramSource Program
Input
![Page 20: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/20.jpg)
20
1st Semester 2005
Translation Method Process
TranslatorTranslator(on computer)(on computer)
File *.exe
Source ProgramSource ProgramSource Program
Input
![Page 21: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/21.jpg)
21
1st Semester 2005
Translators
Assembler (assembly) Compiler (High-level language)
![Page 22: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/22.jpg)
22
1st 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?
![Page 23: Module1 Introduction to Computer and Programming](https://reader030.fdocuments.in/reader030/viewer/2022032708/56812aa7550346895d8e6ae3/html5/thumbnails/23.jpg)
23
1st Semester 2005
Summary
Computer Basic Programming Language
Interpreter Method Translator Method