module1 introduction to computer and programming

Post on 30-Dec-2015

27 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Module1 Introduction to Computer and Programming. อภิรักษ์ จันทร์สร้าง Aphirak Jansang aphirak.j@ku.ac.th http://www.cpe.ku.ac.th/~aphirak Computer Engineering Department Kasetsart University, Bangkok THAILAND. Outline. Introduction to Computer How to run program? Programming Languages. - PowerPoint PPT Presentation

TRANSCRIPT

1

2nd Semester 2004

Module1Module1Introduction to Introduction to

Computer and ProgrammingComputer and Programming

อภิ�รั�กษ์� จั�นทรั�สรั�างAphirak Jansang

aphirak.j@ku.ac.thhttp://www.cpe.ku.ac.th/~aphirak

Computer Engineering DepartmentKasetsart University, Bangkok THAILAND

2

1st Semester 2005

Outline

Introduction to Computer How to run program? Programming Languages

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

4

1st Semester 2005

How can we classify computers?

Personal Computer Desktop Computer Notebook PDA – Personal Digital Assistant

Supercomputer Mainframe High Computation Power

5

1st Semester 2005

Computer Components

Input Devices Output Devices Computing & Processing Unit

6

1st Semester 2005

CPU

MainMemory

Input Devices

HD

Secondary Memory

Output Devices

Computer Components

7

1st Semester 2005

Computer Memory

1.Main Memory 2.Secondary Memory

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

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

10

1st Semester 2005

Main Memory VS Secondary Memory

Main MemoryMuch fasterMore

expensiveVolatile

Secondary MemorySlowerLess expensivePermanent

11

1st Semester 2005

Do you know ASIMO?

*http://world.honda.com/ASIMO/*http://world.honda.com/ASIMO/

12

1st Semester 2005

Outline

Introduction to Computer How to run program? Programming Languages Introduction to Pascal Language

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

14

1st Semester 2005

Outline

Introduction to Computer How to run program? Programming Languages

15

1st Semester 2005

Programming Languages

Machine Language Assembly Language High-Level Language

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

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

18

1st Semester 2005

How to execute program from non-machine language?

Interpretation Method Translation Method

19

1st Semester 2005

Interpretation Method Process

InterpreterInterpreter(on computer)(on computer)

OutputSource ProgramSource ProgramSource Program

Input

20

1st Semester 2005

Translation Method Process

TranslatorTranslator(on computer)(on computer)

File *.exe

Source ProgramSource ProgramSource Program

Input

21

1st Semester 2005

Translators

Assembler (assembly) Compiler (High-level language)

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?

23

1st Semester 2005

Summary

Computer Basic Programming Language

Interpreter Method Translator Method

top related