390 likes | 664 Views
THE HONG KONG POLYTECHNIC UNIVERSITY. Department of Electronic and Information Engineering. ENG224 Information Technology. Part I: Computers and Internet Part II: Networking – Dr W.Y. Tam, EIE Part III: Data Processing – Dr. Thomas Choi, COMP. THE HONG KONG POLYTECHNIC UNIVERSITY.
E N D
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering ENG224Information Technology Part I: Computers and Internet Part II: Networking – Dr W.Y. Tam, EIE Part III: Data Processing – Dr. Thomas Choi, COMP
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering ENG224Information TechnologyPart-IComputers and Internet Lecturer: Dr. Wai-yip Tam Room: DE604 Tel: 27666265 E-mail: enwytam@polyu.edu.hk Web page: www.eie.polyu.edu.hk/~em/it0607.htm
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering Contents • Introduction to Computers • Operating System Case Study: Linux • Internet • Internet Programming – XHTML
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering Information Systems Information Technology Information Engineering Electrical Engineering Electronic Engineering Mechanical Engineering System Engineering
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering 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 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 UNIVERSITY Department of Electronic and Information Engineering 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 UNIVERSITY Department of Electronic and Information Engineering 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 UNIVERSITY Department of Electronic and Information Engineering Three basic elements of IT Computer Networking Data Processing
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 1. Introduction to Computers
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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.
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers • ENIAC • The first practical computer • Built in 1945, weighed more than 30 tons • Require 1500 sq. feet (Electronic Numerical Integrator And Calculator) In 1949, Popular Mechanics magazine predicted “computers in the future may perhaps only weigh 1.5 tons !!!”
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Components of a computer system
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Hardware (Single In-line Memory Module)
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Hardware • Input 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, …
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Hardware • Memory • 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
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers • Another kind of memory • Read 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)
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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 I 1. Introduction to Computers 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 I 1. Introduction to Computers • Buses • Path along which “bits” are transmitted • Linking up the CPU, Memory and I/O devices Address Memory CPU I I I I I D D D I I Instructions / Data 00 01 02 03 04 05 06 07 08 09 I I I I D D D D D D Control 10 11 12 13 14 15 16 17 18 19 20 I: Instruction 21 External Storage I/O 22 I/O I/O D: Data
ENG224 INFORMATION TECHNOLOGY – Part I 1. 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
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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 I 1. Introduction to Computers 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 Machine Language Program
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 00 05 01 20 CPU 02 I D I W R R W R D I R R W W R I/O 05 01 00 20 02 D D EXECUTE FETCH FETCH EXECUTE FETCH EXECUTE • Fetch and Execute • Every instruction should go through two phases of processing: fetch & execute Address Memory CPU I I I I I D D D I I Instructions / Data 00 01 02 03 04 05 06 07 08 09 I I I I D D D D D D Control 10 11 12 13 14 15 16 17 18 19 20 21 I: Instruction I/O 22 I/O I/O D: Data
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers • Fetch • During 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 • Execute • Example: Store data D to address 05 • –Send address 05 to address bus • – Send data D to data bus • – Send control signal Write
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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 Machine Language Program Very tedious and can make error easily
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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 Assembly Language Machine Language mov ax, #0 add ax, $1234 : : mov bx, #22 mov $2345, bx 0110001111000010 0001000111100011 : : 0011000100001000 1000001001010101 Assembler
ENG224 INFORMATION TECHNOLOGY – Part I 1. 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 Registers ax bx Memory cx dx ALU: Arithmetic and Logic Unit : For doing arithmetic and logic operation) Registers: Some very fast memory inside the CPU chip ALU CPU
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Registers ax bx Memory cx dx mov ax, #0 ; ax =0 loop: add ax, $1234 ; add the content at memory ; address 1234 to ax mov bx, #22 ; bx = 22 add ax, bx ; ax = ax + bx jmp loop ; go to the instruction with ; label “loop” ALU CPU A simple assembly language program
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Software - High Level Language Programming • 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 I 1. Introduction to Computers Executable Machine Language Program Linker 1011010101 0101010101 : Library Object code main() { cout << “Hello!”; } Compiler High Level Program
ENG224 INFORMATION TECHNOLOGY – Part I 1. 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
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers Hardware & Software Application Software Banking System / Web Browser / Media player GUI / Command interpreter System Software Operating System Physical devices / Micro-architecture level Hardware
ENG224 INFORMATION TECHNOLOGY – Part I 1. 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)
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers 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 I 1. Introduction to Computers 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 I 1. Introduction to Computers Operating System BIOS 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 I/O Devices Other resources
ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers How the OS is loaded into memory? • 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 I 1. Introduction to Computers Video Interface Disk Interface Bootstrap loader OS Bootstrap loader OS Hard Disk Monitor Video Interface Disk Interface Main Memory (RAM) CPU BIOS (Stored in ROM) Mother Board