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 – – Dr Daniel Lun, EIEDr Daniel Lun, EIE
Part II: Data Processing Part II: Data Processing – – Mr. S.M. Lau, COMPMr. S.M. Lau, COMP
Part III: NetworkingPart III: Networking– – Dr Andy Leung, EIEDr Andy Leung, EIE
2
THE HONG KONG
POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering
ENG224ENG224
Information TechnologyInformation TechnologyPart-IPart-I
Computers and InternetComputers and Internet
Lecturer:Lecturer: Dr. Daniel Pak-Kong LUNDr. Daniel Pak-Kong LUN
Room:Room: DE637DE637 Tel:Tel: 27666255 27666255E-Mail:E-Mail: [email protected]@polyu.edu.hkWeb page:Web page: www.eie.polyu.edu.hk/~enpklun/www.eie.polyu.edu.hk/~enpklun/
ENG224/ENG224.htmlENG224/ENG224.html
3
THE HONG KONG
POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering
Contents
Introduction of Computers Operating System Case Study: Linux Internet Internet Programming - XHTML
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
5
An example – Mobile Banking
Information Systems– To study the various issues in running and
managing a mobile banking business
e.g. Risk management, Organizational behavior, Psychologies of mobile customers, etc.
Information Technology– To optimally integrate the required technologies to
enable a mobile banking business
e.g. Mobile Networking, Security control, Data processing for mobile transactions, etc.
THE HONG KONG
POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering
6
An example – Mobile Banking (Cont)
Information Engineering– To study the techniques required for the
implementation of a mobile banking business
e.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
7
Requirements of an IT Practitioner
To understand the needs of the customers of different information systems and the organizations that provide those systems
To know clearly well the attributes, limitations, strengths and the integration methods of the technologies that enable those information systems
To 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
8
Computer Networking
Data Processing
Three basic elements of IT
THE HONG KONG
POLYTECHNIC UNIVERSITYDepartment of Electronic and Information Engineering
9
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
1. 1. Introduction to ComputersIntroduction to Computers
10
Reference
Peter Norton, Introduction to Computers, McGraw Hill, 5th Ed, 2003
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
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 !!!”
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
12
Components of a computer system
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
14
Hardware
CPU: Central Processing Unit– Brain of the 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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
15
Hardware
Input and Output devices– Interface between the outside world and the
computer system– Input devices: keyboard, mouse – Output devices: monitors, printers– Other I/O devices: network adapter, USB, disk
interface …
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
16
Hardware Memory
– Internal memory / Main memoryRandom 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 info ready to be sent to output Store currently running programs/their data Store immediate data generated by the currently running programs
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
17
ENG224
INFORMATION 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)
18
Hardware
Storage devices– External memory
Non-volatile Used to store programs/data for future use Also used when the capacity of the internal storage is
insufficient to keep the currently running programs and the data required
Floppy disks, hard disks, CD ROMs, Magnetic tapes
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
20
ENG224
INFORMATION 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 – Linking up the CPU, Memory and I/O devices
2021
22I/O
I/OExternal Storage
21
ENG224
INFORMATION 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, should be software programmable
22
Hardware - Instructions Most 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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
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 instruction
1000001001010101 ; the nth instruction
MachineLanguageProgram
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
I/O I: Instruction
D: Data
Fetch and Execute – Every instruction should go through two phases of
processing: fetch & execute
2021
22
I
00
R
00
R
FETCH EXECUTE
CPU
01
R
01
R
FETCH
05
W
D
05W
DEXECUTE
02
R
02
R
FETCH
I/O20
W
20
D
D
W
EXECUTE
I/OI/O
25
• Fetch – Send address 01 to address bus– Send control signal Read– Get instruction I at address 00
• Execute – Send address 05 to address bus– Send data D to data bus– Send control signal Write
Example
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
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• 0110001111000010
0001000111100011
:
:
0011000100001000
1000001001010101
MachineLanguageProgram
Very tedious and can make error easilyVery tedious and can make error easily
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
28
ENG224
INFORMATION 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
CPU
ALU
Registersaxbxcxdx
29
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
Memory
CPU
ALU
Registersaxbxcxdx
A sample 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”
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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
31
main(){ cout << “Hello!”;}
Compiler
Linker10110101010101010101 :
High Level Program
ExecutableMachine Language Program
Object codeLibrary
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
32
ENG224
INFORMATION 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
33
Banking System / Web Browser / Media player
Hardware & Software
Physical devices / Micro-architecture level
Operating System
GUI / Command interpreter
Application Software
System Software
Hardware
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
34
ENG224
INFORMATION 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)
35
Application Software
Develop to fulfill certain needs of users Either customized or packaged
– Customized software Designed for a particular customer according to their
needs Payroll, inventory control, …
– Packaged software Developed for general use Microsoft word, excel, Access, power-point, …
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
36
System Software
Exists primarily for the computer itself Hides the hardware complexities Brings the different hardware configurations
into common platforms and accessible by the users
Consists of several programs, the most important one is the operating system (master control program that runs the computer)
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
37
Operating System Master control program
– Manage all resources of the computer CPU, memory, disk, monitor, network, …
– Co-ordinate running programs Runs as soon as the computer boots
up, until the computer shuts down Usually store in the hard disk and load
into the memory when the computer starts
Need the help of BIOS for I/O devices E.g. Windows, Unix, Linux
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
BIOS
Operating System
I/O DevicesOther resources
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
ENG224
INFORMATION TECHNOLOGY – Part I1. Introduction to Computers
How the OS is loaded into memory?