+ All Categories
Home > Documents > 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton,...

1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton,...

Date post: 06-Aug-2020
Category:
Upload: others
View: 12 times
Download: 0 times
Share this document with a friend
39
1 THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering ENG224 ENG224 Information Technology Information Technology Part I: Computers and Internet Part I: Computers and Internet Part II: Networking Part II: Networking Dr W.Y. Tam, EIE Dr W.Y. Tam, EIE Part III: Data Processing Part III: Data Processing Mr. S.M. Lau, COMP Mr. S.M. Lau, COMP
Transcript
Page 1: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

1

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

ENG224ENG224

Information TechnologyInformation Technology

Part I: Computers and Internet Part I: Computers and Internet Part II: NetworkingPart II: Networking

–– Dr W.Y. Tam, EIE Dr W.Y. Tam, EIE Part III: Data Processing Part III: Data Processing

–– Mr. S.M. Lau, COMPMr. S.M. Lau, COMP

Page 2: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

2

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

ENG224ENG224Information TechnologyInformation Technology

PartPart--IIComputers and InternetComputers and Internet

Lecturer:Lecturer: Dr. Dr. WaiWai--yip Tamyip Tam

Room:Room: DE604DE604 Tel:Tel: 2766626527666265EE--mail:mail: [email protected]@polyu.edu.hkWeb page:Web page: www.eie.polyu.edu.hk/~em/ENG224/it05.htmwww.eie.polyu.edu.hk/~em/ENG224/it05.htm

Page 3: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

3

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

Contents

Introduction to ComputersOperating System Case Study: LinuxInternetInternet Programming – XHTML

Page 4: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

4

Information Engineering

Information Technology

Information Systems

Electronic Engineering

Mechanical Engineering

Electrical Engineering

System Engineering

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

Page 5: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

5

An example – Mobile BankingInformation Systems– To study the various issues in running and managing a

mobile banking businesse.g. Risk management, Organizational behavior,

Psychologies of customers, etc.Information Technology– To optimally integrate the required technologies to

enable a mobile banking businesse.g. Mobile Networking, Security control, Data

processing for mobile transactions, etc.

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

Page 6: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

6

An example – Mobile Banking (Cont)

Information Engineering– To study the techniques required for the implementation

of a mobile banking businesse.g. Data transmission through mobile networks, Mobile

handset design for data transmission, Data encryption algorithms, Database design and interface, etc.

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

Page 7: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

7

Requirements of an IT PractitionerTo understand the needs of the customers of different information systems and the organizations that provide those systemsTo know clearly well the attributes, limitations, strengths and the integration methods of the technologies that enable those information systemsTo understand the basic principles of the information engineering techniques for the implementation of those information systems

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

Page 8: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

8

Computer Networking

Data Processing

Three basic elements of IT

THE HONG KONG POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering

Page 9: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

9

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

1. 1. Introduction to ComputersIntroduction to Computers

Page 10: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

10

Reference

Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003

G. Michael Schneider and Judith L. Gersting, Invitation to Computer Science, 3rd Ed, 2004.

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 11: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

11

ENIAC

• The first practical computer

• Built in 1945, weighed more than 30 tons

• Require 1500 sq. feet

In 1949, Popular Mechanics magazine predicted “computers in the future may perhaps only weigh 1.5 tons !!!”

In 1949, Popular Mechanics magazine predicted “computers in the future may perhaps only weigh 1.5 tons !!!”

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

(Electronic Numerical Integrator And Calculator)

Page 12: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

12

Components of a computer system

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 13: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

13

Hardware

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

(Single In-line Memory Module)

Page 14: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

14

Hardware

CPU: Central Processing Unit– Brain of a computer– Manages all devices and performs the actual processing

of data– Carry out instructions given by user– For Personal Computer (PC), the CPU is usually

included in a single Integrated Circuit (IC) chip (called Microprocessor)

– Nowadays, one or more microprocessors (chips) can be used to form a CPU⇒ Parallel Processing

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 15: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

15

HardwareInput and Output devices (I/O devices)– Interface between the outside world and the computer

system– Input devices: keyboard, mouse – Output devices: monitors, printers– Other I/O devices: scanner, joystick, touch screen, …

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 16: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

16

HardwareMemory– Internal memory / Main memory

Random Access Memory (RAM)– Main feature 1: volatile

⇒ requires continuous supply of electrical power to retain information

– Main feature 2: cheap in terms of bytes per dollar ⇒ suitable for large volume data storage

– Functions:⇒ Receive commands / data from keyboard⇒ Store information ready to be sent to output⇒ Store currently running programs/their data⇒ Store immediate data generated by the currently

running programs

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 17: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

17

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Another kind of memoryRead Only Memory (ROM)

– Main feature 1: non-volatile⇒ data retain even when the power is off

– Main feature 2: relatively expensive and can only be written once⇒ suitable for storing essential data but in small volume

– Usually used for system boot up and basic control of I/O devices ⇒ When a computer first powers up, nothing is in RAM⇒ Need ROM to store the instructions to set up various I/O devices, such as disk interface card, video adapter card, sound card, etc.

– ROM is used to store BIOS (Basic Input/Output Systems)

Page 18: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

18

Hardware

Storage devices– External memory

Non-volatileUsed to store programs/data for future useAlso used when the capacity of the internal storage is insufficient to keep the currently running programs and the data requiredFloppy disks, hard disks, CD ROMs, Magnetic tapes

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 19: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

19

Hardware

Main differences between storage & memory:– Larger capacity in storage than in memory– Data in storage are retained while data in memory

disappear when power is off– Storage is much cheaper than memory

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 20: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

20

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Instructions / DataCPU

I DI I I

II I I

I I ID D

D D D D D D00 01 02 03 04 05 06 07 08 09

10 11 12 13 14 15 16 17 18 19

MemoryAddress

Control

I/OI: Instruction

D: Data

Buses – Path along which “bits” are transmitted – Linking up the CPU, Memory and I/O devices

2021

22I/OI/OExternal Storage

Page 21: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

21

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Stored Program Concept – In 1949, Dr John Von Neumann defined the stored

program concept that greatly affected the development of nowadays computers

– Suggested that program instructions should be stored in a memory unit just like data⇒ Instructions: Commands of user⇒ Data: Information that commands work on

– Hence rather than hardware programmable (rewire was required for a new problem), should be software programmable

Page 22: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

22

Hardware - InstructionsMost CPUs have built in a few hundreds of standard operations– E.g. add, subtract, multiplication, division, AND, OR, NOT,

etc.Each operation is represented by an instruction code– E.g. Add 1010100101– Subtract 1000100001– :

When an instruction code is fetched from memory to the CPU, the CPU knows that the corresponding operation should be performed

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 23: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

23

Hardware - Instructions• A computer program is constructed by a combination of different

instruction codes • Called as Machine Language Program, since it is written by 0 and 1,

the only language that the CPU can understand• 0110001111000010 ; the 1st instruction

0001000111100011 ; the 2nd instruction::

0011000100001000 ; the n-1th instruction1000001001010101 ; the nth instruction

MachineLanguageProgram

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 24: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

24

Instructions / DataCPU

I DI I I

II I I

I I ID D

D D D D D D00 01 02 03 04 05 06 07 08 09

10 11 12 13 14 15 16 17 18 19

MemoryAddress

Control

II

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

I/O I: InstructionD: Data

Fetch and Execute – Every instruction should go through two phases of processing:

fetch & execute

2021

22

I

00

R

00R

FETCH EXECUTE

CPU

01

R

01R

FETCH

05

W

D

05W

DEXECUTE

02R

02

R

FETCH

I/O20W

20

D

D

W

EXECUTE

I/OI/O

Page 25: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

25

• FetchDuring the fetch phase, the control unit gets the next instruction from memory and moves it into the CPU

Example:– Send address 01 to address bus– Send control signal Read– Get instruction I at address 00

• ExecuteExample: Store data D to address 05 – Send address 05 to address bus– Send data D to data bus– Send control signal Write

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 26: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

26

Software - Programming• Programming – the way to generate a program• Computer can only understand 0 and 1• The most direct way to communicate with the computer is to use

0 and 1 ⇒ Machine Language Programming

• 01100011110000100001000111100011

::

00110001000010001000001001010101

MachineLanguageProgram

Very tedious and can make error easilyVery tedious and can make error easily

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 27: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

27

Software - Assembly Language Programming• Assembly Language is created to help human instructs CPU to

work• By using a tool called Assembler, assembly language program can

be converted into machine language program

Assembler

01100011110000100001000111100011

::

00110001000010001000001001010101

mov ax, #0add ax, $1234

::

mov bx, #22mov $2345, bx

Assembly Language Machine Language

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 28: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

28

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

• Different CPU will have different set of assembly language codes• In fact, to understand an assembly language program, we need to

first understand the architecture of the CPU

ALU: Arithmetic and Logic Unit: For doing arithmetic and logic operation)

Registers: Some very fast memory inside the CPU chip

Memory

CPUALU

Registersaxbxcxdx

Page 29: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

29

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Memory

CPU

ALU

Registersaxbxcxdx

A simple assembly language program

mov ax, #0 ; ax =0loop: add ax, $1234

; add the content at memory ; address 1234 to axmov bx, #22 ; bx = 22add ax, bx ; ax = ax + bxjmp loop; go to the instruction with ; label “loop”

Page 30: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

30

Software - High Level LanguageProgramming• Assembly language programming is still too complicated for

general users• They are far from human used language

e.g. “Set W equal to W plus X minus Y divided by Z”“Repeat the next sequence of instructions until X is less than 0 or Y equals Z”

• A high level language is required to close the gap between human and computers

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 31: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

31

main(){ cout << “Hello!”;}Compiler

Linker10110101010101010101

:

High Level Program

ExecutableMachine Language Program

Object codeLibrary

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 32: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

32

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Machine Language Programming– No application nowadays

Assembly Language Programming– Advantage: Less complicated than Machine Language. Usually

generate more efficient code than HLL– Disadvantage: Need the understanding of CPU structure. Still difficult

to program– Application: Sometimes use in the programming of embedded

systems (e.g. CPU of printer, washing machines, etc.)

High Level Language Programming (such as C/C++)– Advantage: Need the least amount of effort to write a program– Disadvantage: The program written may not be optimal (depends on

the compiler)– Application: For large scale programs

Page 33: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

33

Banking System / Web Browser / Media player

Hardware & Software

Physical devices / Micro-architecture level

Operating System

GUI / Command interpreter

Application Software

System Software

Hardware

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 34: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

34

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

User interacts with application software System software enables the application software to interact with computer CPU and help the computer to manage its internal resources (hardware)

Page 35: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

35

Application Software

Develop to fulfill certain needs of usersEither customized or packaged– Customized software

Designed for a particular customer according to their needsPayroll, inventory control, …

– Packaged softwareDeveloped for general useMicrosoft word, excel, Access, power-point, …

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 36: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

36

System Software

Exists primarily for the computer itselfHides the hardware complexitiesBrings the different hardware configurations into common platforms and accessible by the usersConsists of several programs, the most important one is the operating system (master control program that runs the computer)

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

Page 37: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

37

Operating SystemMaster control program

– Manage all resources of the computerCPU, memory, disk, monitor, network, …

– Co-ordinate running programsRuns as soon as the computer boots up, until the computer shuts downUsually store in the hard disk and load into the memory when the computer startsNeed the help of BIOS for I/O devicesE.g. Windows, Unix, Linux

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

BIOS

Operating System

I/O DevicesOther resources

Page 38: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

38

• When power up, nothing is in RAM. No control is possible to the hard disk to load the OS

• CPU starts to read the BIOS instructions stored in the ROM

• Things that normally perform– Initialize all I/O devices: hard disk, video, mouse,

keyboard, CD-ROM, etc– Load the bootstrap loader of the operating system to

RAM– Start to execute the bootstrap loader in RAM

• The bootstrap loader further loads the other part of the operating system to the RAM

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers

How the OS is loaded into memory?

Page 39: 1 Introduction to computers - EIEem/it0506pdf/1 Introduction to computers.pdf · Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003 G. Michael Schneider and Judith

39

CPU

Main Memory (RAM)

BIOS(Stored in

ROM)

Hard Disk

Mother Board

Disk Interface

Video Interface

Monitor

Disk Interface

Video Interface

Bootstrap loader

Bootstrap loader

OS

OS

ENG224INFORMATION TECHNOLOGY – Part I1. Introduction to Computers


Recommended