204111 Computer & Programming

Download Report

Transcript 204111 Computer & Programming

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