computer system and prog

101
1 Lecture notes Computer systems and Progra mming Mechanical Engineering 1 st Semester By: Adam khan Lecturer computer science Sarhad University of science and IT, Peshawar.

Upload: tanzeel-khan

Post on 07-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 1/100

1

Lecture notes

Computer systems and Progra

mming

Mechanical Engineering

1st

Semester

By: Adam khan Lecturer computer science Sarhad University of science and IT,

Peshawar.

Page 2: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 2/100

2

How is a computer defined?

 What Is a Computer?

Electronic device operating under the co

ntrol of instructions

stored in its own memory

The computerfirst, Accepts data such as raw facts, figures, and symbol

then, Processes data into information (Data that is organized,meaningful, and useful )

finally, Produces and stores results

Page 3: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 3/100

3

 The Components of a Computer

What is an input device?

Hardware used

to enter dataand instructions

 _____ 

Page 4: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 4/100

4

 The Components of a Computer

What is an output device?

Hardware that

conveys informationto a user

 ______ 

Page 5: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 5/100

5

 The Components of a Computer

What is the system unit?

Box-like case

containingelectronic

components

used to process

data

Page 6: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 6/100

6

 What is the magical inside the black box?

  C   P   U

Memorycard

Sound

Card

VideoCard

S t o r a g e  U ni t s 

Power

Supply

Page 7: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 7/100

7

 The Components of a Computer

What are two main components on the motherboard?

Central Processing Unit (CPU)

Also called a processor

Carries out instructions

that tell computer what to do

Memory

Temporary holding place for dataand instructions

Page 8: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 8/100

8

 The Components of a Computer

What is storage?

Storage media

Physical material on which data, instr uctions,

and information are stored

Storage mediaStorage media

Physical material on which data, instructions,

and information are stored

Storage device

Records and retrieves items to and froma storage medium

Storage deviceStorage device

Records and retrieves items to and froma storage medium

Holds data, instructions, and information

for future use

Page 9: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 9/100

9

Storage deviceStorage device

What is a floppy disk ?

Thin, circular,

flexible disk enclosed in rigid

plastic shell

A Zip® disk looks

similar but has

much greaterstorage capability

(=170 floppy disk)

Page 10: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 10/100

10

 The Components of a Computer

What is a hard disk ?

Provides much

greater storagecapacity than a

floppy disk or

Zip® disk 

Housed inside the

system unit

Page 11: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 11/100

11

 The Components of a Computer

What is a compact disc?

Flat, round, portable Optical disc

CD-ROM CD-RW

Capacity: 673~768 MB

DVD-ROM

DVD+RW

Capacity:4.7 ~ 17.1 GB

Page 12: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 12/100

12

 The Components of a Computer

What is miniature storage

media?

Digital

cameras

Digitalcameras

Handheld

computers

Handheld

computers

Portable, thin

memory cards

used in:

Portable, thin

memory cards

used in:

Page 13: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 13/100

13

Primary Memory

Primary memory refers to internal storage of a computer,

where the programs & data are stored.

Primary storage or primary memory provides temporary(RAM) storage during program execution.

Part of primary storage may also contain permanently

(ROM) stored instructions that tell the computer what to do,when it turned on.

Because primary storage is located inside the computer &

is linked directly to the other components of the CPU,access time to data is very fast.

Page 14: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 14/100

14

Primary Memory (continue…)

  RAM: (Random Access Memory): HISTORY:

For many years main memory was one of the most expensivecomputer components to the manufacturer.

Their size has been dramatically reduced, & they have become lessexpensive as the manufacturing materials have changed from vacuum

tubes to magnetic cores & then to transistors & finally to the chips weknow today.

The earliest form of main memory was based on vacuum tubes.

There would have required a shelf of vacuum tubes more than a mile

long for very small memory. As the tubes were not so variable their power requirements were high

they generated heat, they failed frequently, & they were slow.

Page 15: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 15/100

15

Primary Memory (continue…)

The transistors, invented in 1947 were much smaller &more reliable provider of main memory.

smaller power requirements & failed less frequently thanvacuum tubes.

Magnetic cores were smaller still.

In mid 1970’s work had begun on new type of mainmemory technology.

A semiconductor material was used.

The main memory of almost all computers today is basedon this technology,

chips are very small & relatively inexpensive tomanufacturer, & they do not consume as much power as

older forms of main memory.

Page 16: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 16/100

16

Primary Memory (continue…)

Functions of RAM:

It is a part of primary storage

where data & programs instructions are held temporarily

They are referred to as Random Access Memory (RAM) chips

 because any of the locations on chip can be randomly selected & used

to directly store & retrieve data & instructions.

RAM depends on a steady supply of electricity to maintain data

storage.

When the power of the computer is shut off, everything stored in

RAM is lost. So RAM is a volatile memory, which is subject to loss when the

 power is turned off.

Page 17: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 17/100

17

Primary Memory (continue…)

Different types of software have different types of space in

memory

the instructions of any software which is currently running by computer will be stored temporary in RAM.

After closing of that software the memory (RAM) will be

empty. So it is concluded that more space of RAM faster will be

the computer.

Page 18: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 18/100

18

Primary Memory (continue…)

 ROM: (  Read only Memory )

As the name implies the contents of read – only storage

memory (ROM), can only be read data can’t be written into it.

ROM may contain information on how to start the

computer & even the instructions to the entire operatingsystem.

The actual content of ROM are usually set by the computer manufacturer, they are unchangeable & permanent.

Because the contents cannot be altered & they are not lost.When the electric current is turned off, ROM is nonvolatile.

Page 19: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 19/100

19

Characters tics of computer

What makes a computer powerful?

Speed ( ideal for processing large amounts of data )

Accuracy (accuracy of a computer is consistently high)

Versatility (capable of performing any task provided)

Power of remembering (store and recall any amount of 

information )

Page 20: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 20/100

20

Characteristics (continue…..)

Storage capability (able to store tremendous amounts of data )

No feelings (can’t make judgments on their own)

Page 21: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 21/100

21

 Types of computers (According to work)

Three types:

1) Analog computers:

•Analog data (Temperature, pressure, speed, voltage)

•Continues

•E.g: Speedo meter (car speed)

Page 22: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 22/100

22

 Types (continue…)

2) Digital computers:

•1-ON 0-OFF

•Process numeric and non numericdata

•General purpose

Page 23: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 23/100

23

 Types (continue……)

3) Hybrid computers:

•Combination of digital and analog

•Speed of analog

•Memory & Accuracy of digital

•Used where both type of data

 processed

•E.g:

In hospitals ,ICU: Analog device

measure temperature and B.P ,which

are then converted into digits.

Page 24: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 24/100

24

Classification of Computers

1)Super computers:

Largest, fastest and more

expensive50,000 times faster thanmicrocomputers

60 miles of wiring inside

Largely heat production

AC is used all around

Scientific purposeE.g: Earthatmosphere,airplane,oilcompanies

Page 25: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 25/100

25

Classification (continue…)

2) Main frame computers:

Slower, less powerful and less

expensive

Introduced by IBM

Temperature may be adjusted

Storage in Mb.

Uses : Banks, ATM : different

 branches

Page 26: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 26/100

26

Classification (continue…)

3) Mini computers:

General purpose

Smaller and less expensiveStorage as Tape,floppy,and

removable disks

Accounting, scientific and

databases

Page 27: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 27/100

27

Classification (continue…

4) Micro computers :

Smallest, less expensive

Keyboard, disk drives, monitors, printer, cables

Connected capability

Page 28: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 28/100

28

Classification (continue…)

5) Desktop computers:

As micro computer 

The mini computer that fits nicelyon the top of a desk at home or 

office

Page 29: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 29/100

29

Classification (continue…

6) Laptop:

Briefcase computer 

KeyboardLCD

Page 30: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 30/100

30

Classification (continue…)

7) Handheld computers:

A Portable computer that is small enough to

 be held in one's hand.

extremely convenient to carry

ipod, iphone, cell phones etc

Provides personal organizer functions

Calendar 

Appointment book 

Address book 

Calculator 

 Notepad

Page 31: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 31/100

31

 Types of computers (according to purpose)

1) General purpose:

Word processing

Databases Controlling security

Can store and execute data

Page 32: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 32/100

32

 Types( continue…)

2) Special purpose:

Particular problem

Dedicated computers Games, control of traffic lights, weather prediction

Perform only one task 

Page 33: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 33/100

33

Software's

Definition: “Software is made up of programs each of 

which is a group of related instructions that perform very

 specific task “ “Bridge”, between and a computer system

Software can generally be divided into two categories

System software  Application software

Page 34: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 34/100

34

 Types of software's

Software’s

System Software's Applications Software's

General Purpose s/w Special Purpose s/w  

Page 35: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 35/100

35

Computer Software

What is system software?

Operating System (OS)

is a set of programsthat coordinates all

activities among

computer hardware

devices and allows

users to runapplication software

Operating System (OS)Operating System (OS)is a set of programs

that coordinates all

activities among

computer hardware

devices and allows

users to runapplication software

Utility Programs allow the user to perform maintenance-type tasks

usually related to managing a

computer, its devices or its programs

Utility ProgramsUtility Programs allow the user to perform maintenance-type tasks

usually related to managing a

computer, its devices or its programs

Programs that control the operations of the computer and

its devices

Page 36: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 36/100

36

Computer Software

What is application software?

Presentation

Graphics

Spreadsheet

Database

Word

Processing

Programs that perform specific tasks for users

Suite

Popular software applications bundled

together as a single unit

Application software categorizes in two groups.General purpose software.

 Special purpose software.

Page 37: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 37/100

37

 Types of Application Software's

General Purpose S/w:

Enough features to do a wide variety of tasks (jobs)

like Microsoft word which is a package includes word,excel, power point, & access

it can be used by a student to write a research paper 

 by an office secretary for mailing lists.etc

The student, the secretary, or the lawyer can use the same

 software.

'

Page 38: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 38/100

38

Special Purpose Software's

Special purpose software performs a ver y specific task for a

user.

cannot be changed to perform specific task for specific user.

H d '

Page 39: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 39/100

39

Hardware's

“The computer and its associated equipments are called as Hardware devices”

Physically exist

We can touch

Can be replaced

There are four important areas in computer, which comes inHARDWARE

1) Input devices

2) Output devices

3) CPU

4) Secondary storage devices

H d ( i )

Page 40: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 40/100

40

Hardware (continue … )

Output devices: “to view information”

a) Printers

 b) Monitorsc) Plotters

d) speaker 

H d ( i )

Page 41: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 41/100

41

Hardware (continue …)

Processing Hardware(CPU): “ Interpret and direct the

execution of software's”

a) CPU b) Main Memory

H d ( ti )

Page 42: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 42/100

42

Hardware (continue…)

Storage devices: “ To store computer instr uctions and data in

a form that is relatively permanent.”

a) Hard drives b) Flash Memory

c) CD/DVD disks

H rd r d i ( ntin )

Page 43: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 43/100

43

Hardware devices (continue…)

1) Input devices: “To collect data and convert it into a

computer readable form.”

a) Key boardb) Mouse

c) Touch pad

d) Scanner

e) Touch screen

Operating system:

Page 44: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 44/100

44

Operating system:

“An operating system is a set of programs that allows the

computer to control and manage its own resources, such

as the central processing unit, memory and secondary

storage”.

intermediary between the hardware and software programs

(Application) such as word processing and data base

 programs.

Much of work of an operating system is hidden from the

users; many necessary tasks are performed behind the

scene.

Operating System (continue )

Page 45: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 45/100

45

Operating System (continue…)

Evolution:

In early days The programmer first writes a pr ogram & operates the program directly from the operator console.

As time went on, additional, software & hardware were developed. First operating was developed in 1950’s which was only used by IBM

701, computer system.

After as the time was passed much operating system software wereintroduced, like windows, Apple Macintosh

Microsoft Macintosh

Dos (disk operating system) Apple (operating system)

(Text based) G U I Windows version

G U I (graphical user interface)

Operating System (continue )

Page 46: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 46/100

46

Operating System (continue…)

Microsoft operating systems:

(1) DOS: (Disk operating system):

This operating system was used for earlier Intel’s personalcomputers.

It was early developed in 1981 for IBM personal computer.

Its interface is command line because it is text baseenvironment.

It supports only one user at a time & single processor.

Operating System (continue )

Page 47: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 47/100

47

Operating System (continue…)

(2) Micro Soft windows:

(a) MS win 3.x:

This version enables the user to take full advantage of Intel’s processor 80386.

Other versions win 3.1, 3.11,

(b) Win 95 & win 98: It was true operating system, & key feature was

multitasking.

Its properties was internet connectivity, update driver including DVD-ROM discs & devices for USB

(Universal serial bus) connection

Page 48: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 48/100

Operating System (continue )

Page 49: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 49/100

49

Operating System (continue…)

(C) MS win Me ( millennium):

This operating system was released in 2000; it improved

capability of multimedia & digital video editing support.(d) Ms win CE ( consumer electronics):

This OS is designed for personal digital assistant (PDA),

and it is the light version of windows which used for mobiles, e.t.c

Operating System (continue )

Page 50: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 50/100

50

Operating System (continue…)

(e) MS win NT ( network )

This OS designed for networking (client/ server)

(f) MS win 2000:

This OS was released in the year 2000.

It combines user friendly interface & features of win 98 withfile system, networking power & stability, and newimprovement was done.

It has four editions.

MS win professional MS win server standard edition

MS win advanced server MS win data center server 

Operating System (continue…)

Page 51: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 51/100

51

Operating System (continue…)

(g) Windows XP 

Microsoft has developed Windows XP is a line of operating

systems for applying on general functional computer systems which includes business and home desktops, media

centers and notebook computers.

Windows XP was released on 25th October 2001.

(h) Windows XP 64-bit Edition 2003

(i) Windows Server 2003

(j) Windows XP Professional x64 Edition

Operating System (continue…)

Page 52: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 52/100

52

Operating System (continue…)

(k) Windows Vista After a world-wide success of XP and its service packs Microsoft has

designed and created Windows Vista the operating system for use on

 personal computers, including business and home desktops, Tablet PCs,

laptops and media centers.

It was first named as "Longhorn" but later on 22nd July 2005, the name was

announced as Windows Vista.

The development of Vista was finished on 8th November, 2006. In the next

three months Vista was available in steps to computer software and

hardware manufacturers, retail counters, and business organizations.

It was released globally on 30th January 2007, for the general public.

(l) Windows Home Server (m) Windows Server 2008

(n) Windows 7 

Programming

Page 53: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 53/100

53

Programming

“A program is a set of step by step instructions that direct thecomputer to do the task user wants”.

 Programming process:

 Define the problem:Problem can be analyzed by the user’s wants & needs.

 Planning the solution:

After the analysis a software engineer’s think that how to plane the

solution for the user needs.Coding:

Coding is done by different programming tools.

Testing:

After the coding the s/w which is build, should be tested.

 Documenting:

The detailed description & the programming cycle.

Programming (continue…)

Page 54: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 54/100

54

g g ( )

 Programming languages:

consists of all the symbols, characters.

There are several thousand programming languages,

 programming languages consists of a vocabulary & set rules(called syntax ), that the programmer must learn.

 Instruction of programming languages:

Input & output instructions ( data c.p.u )

Arithmetic instructions ------ mathematical operation

Logical instructions --------- comparison

Control instructions ---------- execution

Data movement instructions------- copy & move

Specification instructions--------- to specify memory allocation.

Programming (continue…)

Page 55: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 55/100

55

g g ( )

Levels of Programming Languages:

Basically, programming languages are divided into different

levels.1) Low level languages

2) High level languages.

Programming (continue…)

Page 56: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 56/100

56

g g ( )

Levels of Programming Languages:

Levels

Of 

Prog: Languages

Low Level Languages High Level Languages

Machine Level Languages

Assembly Level Languages

V.High Level Languages

Natural Languages

Programming (continue…)

Page 57: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 57/100

57

g g ( )

Low level languages:

Low level computer programming languages are machine

codes or close to it. Computer can’t understand instructions given in high level

languages or in English.

It can only understand & execute instructions given in theform of machine language, i.e. the language of 0, 1. There

are two types of low level language.

1. Machine Languages2. Assembly languages

Programming (continue…)

Page 58: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 58/100

58

g g ( )

1)Machine language: ( first generation lan guage)

(Instruction that computer execute directly).

It is the lowest & most elementary level of programminglanguage & was the first type of programming languagewhich to be developed.

Computer can only understand machine language.

The computer manufacturer when design a computer so itwill be necessary to obey just one language,

i.e. machine code. 0, 1, where 0, stands for OFF & 1,

stands for ON, of electric pulse.

Programming (continue…)

Page 59: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 59/100

59

 Advantages:

It makes fast and efficient use of the com puter.

It requires no translator to translate the code i.e. directlyunderstood by the computer.

 Disadvantages:

All operation codes have to remember. All memory addresses have to be remembered.

To find out the error, is difficult.

These are machine dependent.

Programming (continue…)

Page 60: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 60/100

60

 Assembly language: (second generation language)

designed to overcome the difficulties of machine language.

The operation codes & operands are given in the form of alphanumeric symbols instead of 0’s & 1’s.

These codes were called “mnemonic codes”, e.g. ADD for addition, SUB for subtraction, e.t.c.

there was very small English support language given to thislanguage.

The instructions of the Assembly language will also be

converted to machine codes by language translator to beexecuted by the computer. E.g. ADD CX AX.

Programming (continue…)

Page 61: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 61/100

61

 Advantages:

It is easy to use & understands as compared to machine

language. Its error may be located easily.

The modification is easy.

 Disadvantages: It is also machine dependent

It was machine dependent so the programmer should have

the knowledge of the hardware.

Programming (continue…)

Page 62: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 62/100

62

High level languages: (third generation language)

This type of computer language is very much like everydaytext & mathematical formulas.

It’s designed is to run on different computers with few or no change. It means the compatibility.

Its format close to English language these are basically

symbolic languages rather than mnemonic codes”. This type of languages depends on.

Type of the problem.

Purpose :business, educational e.t.c

Ease of learning & use.

Portability

Documentation provided.

Programming (continue…)

Page 63: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 63/100

63

 Advantages:

User friendly.

Similar to English vocabulary.

Less time required to write.

Easier to maintain.

It is problem oriented.

It is compatible.

Portable.

 Disadvantages:

It should be translated for the convert in machine language, so thecomputer time is waste.

Programming (continue…)

Page 64: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 64/100

64

Very high level languages: (fourth generat ion )

In this type of languages, programs are developed;

speed is much higher and also required minimum user effort.

The level of programming skills not required much more.

Its maintenance is less because it reduces error.

When we want to change the program so it is easy.

These languages usually used in conjunction with data base.i. Query languages

ii. Report generators

iii. Application generators

iv. Decision support system & financial planning language(information & data)

v. Micro computer application s/w (create s/w for specification)

Programming (continue…)

Page 65: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 65/100

65

 Natural languages:

The natural languages statements are very closely resemble

to human speech. These types of languages used in expert system, artificial

intelligence e.t.c.

Page 66: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 66/100

Programming (continue…)

Page 67: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 67/100

67

 Assembler:

Translate assembly code to machine language supplied by

the manufacturer of computer.Complier:

Program written in high level language to convert in

machine instructions, before running the program, i.e.whole program.

 Interpreter:

Program written in high level language to convert inmachine instruction, before running the program , i.e. each

& one statement of the code.

Data Communication and Networks

Page 68: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 68/100

68

Data Representation

Different forms of data Representation

Text: bit pattern i.e 0,1 Numbers: Bit pattern i.e 0,1

Images: Bit Pattern but mechanism is different , Image

is divide into pixels, called as resolution. Audio: converted into signals

Video: combination and image and video.

Direction of Data flow 

Page 69: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 69/100

69

Communication b/w two devices can be of three types

Simplex : data is unidirectional, one device transmits and

the other receive, e.g. keyboard

Direction of Dataflow 

Page 70: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 70/100

70

Half duplex: each device can transmit and receive data/message but

not at the same time, it is like one lane road. E.g walkie talkies, radios,

etc

Page 71: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 71/100

Data communication

Page 72: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 72/100

72

Sharing of information

“exchange of data b/w two devices via some form oftransmission medium”.

Fundamentals characteristics of data communication:

Delivery: correct destination, sender or receiver Accuracy: in time of transmission data must secured

Timeliness: Timely manner

Components of data communication

Protocol

Page 73: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 73/100

73

1)Message

2)Sender

3)Receiver

4)Medium

5)Protocol

Message

Step#1

Step# 2

Step# 3

....

ProtocolProtocol

Step#1

Step# 2

Step# 3..

..

Sender Receiver

Medium

Message

Sender

 Types of Networks

Page 74: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 74/100

74

There are three types of Networks:

1) LAN (Local Area Network)

2) MAN( Metropolitan Area Network)3) WAN (Wide Area Network)

Local Area Network 

Page 75: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 75/100

75

Privately owned

Within single office, building or campus

May be as simple as two PC’s and a printer

Limited to few Kilometers

Limited users

Metropolitan Area Network 

Page 76: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 76/100

76

Designed to extend over an entire city

May be a single network 

It may be a means of connecting a number of LAN’s

A company can use a MAN to connect the LAN’s in all

its offices through a city

MAN may be wholly owned and operated by a privatecompany

E.g: cable TV network 

 Wide Area Network 

Page 77: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 77/100

77

Provides long distance of transmission of data, voice,

image, video over large geographic areas

May be country to country, continent to continent

Unlimited number of users

Internet is best example of WAN

Networks and the Internet

Page 78: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 78/100

78

One type isa modem

What is a network ?

Enables a

connection

 between

computers

Enables a

connection

 between

computers

Cables

Cellular 

radio

Telephone

lines

Satellites

Communications

Media

Communications

Media

Communications

Device

Communications

Device

Collection of computers and devices connected together

Networks and the Internet

Page 79: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 79/100

79

To shareTo share

Why do we need network?

ResourcesResources

Hardware

devices

Hardware

devices Software

 programs

Software programs

DataDataTo save

time

andmoney

To save

time

and

moneyInformationInformation

Internet

Page 80: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 80/100

80

Also called “internetworking”

Technically it is best defined technology for linking

LAN’s into a huge congested networks.

ISP( who sell internet subscription to the public

Interoperability

Global Network of computers More interactive than the other types of media

Internet

Page 81: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 81/100

81

Worldwide collection of networks that connects

millions of computers

Internet (History)

Page 82: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 82/100

82

The internet began way back in 1961, but it was called the“ARPANET” (Advanced Research project Agency), within the USdefense Department, in conjunction with a number of universities &military contractors.

Its purpose was to explore the possibility of a communication. Network that could survive a nuclear attack.

The “ARPANET” quickly developed into a communication tool.

It was used for e-mail, discussion groups & for exchanging files. In 1979 its capacity of users increased & popular & more universities

connected.

Some other communication networks were introduced, but these were

not go along with internet because they have very complications & problems in communication with other computers.

Internet (History)

Page 83: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 83/100

83

In 1983 a standard communication protocol was introducecalled as “TCP/IP” (transmission control protocol / internet

 protocol).

So the internet became very sophisticated & increasinglygrowth of internet starts of its multi advantages.

 Protocols: In data communication & networking, a standard

specifying the format of data & the rules to be followed iscalled “Protocol”.

The function of a network are the standards, these are

“Protocols”.

Internet (uses)

Page 84: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 84/100

84

(1) To find general information about a subject:

The web is like a huge encyclopedia of information.

The information find on the internet is amazing, It offers much different perspective on one single topic

Also we can access that information which is not easily

accessible, e.g. online apply to international universitiesreading books, much more information.

Internet Uses (Continue…)

Page 85: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 85/100

85

(2) To meet people:

The web is generally a very friendly place.

People may use e-mail which is cheap & very easy, also itis very faster.

Different types of chatting software's have been developed

for this purpose. It offers text chat as well as voice chatting also.

Internet Uses (continue…)

Page 86: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 86/100

86

(3) To learn:

On-line distance education courses can give you an

opportunity to gain a qualification over the internet.

(4) To find software’s:

The internet contains a wealth of useful downloadablesoftware’s.

Some are for limited time & some are full versions of 

software.

Internet Uses (continue…)

Page 87: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 87/100

87

(5) To buy things:

If you want to buy something through internet, so there are

many companies who offering his services.

But “Security “for online shopping is still not good, as well

as some websites may have minimal security.

(6) To advertise a product:

Most company websites start up as a big advertisement for 

their products & services. Companies may also give away some information for free

as an incentive for people to visit their pages.

Internet Uses (continue…)

(7) T ll d

Page 88: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 88/100

88

(7) To sell a product:

Internet shopping (E- commerce) is still is its growth ittakes a very good marketing strategy to actually make

money out of selling items over the web.(8) To make money:

A popular way to make money out of the web is from

advertising revenue. Popular websites have banners at the top of the page attract

 people to click them and be taken to the advertiser’s

website. These banners are generally animated and veryappealing, with good messages, to make users wonder.

Internet Uses (continue…)

(9)T h k l d i h h ld

Page 89: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 89/100

89

(9)To share knowledge with the world:

Many individuals write webpage’s to share information

about their interest or hobbies.

They just feel that the web has given then so much

information that at least they can put something that can be

useful for others.

Page 90: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 90/100

Page 91: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 91/100

Internet (Features)

3) I t t li ht d

Page 92: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 92/100

92

3) Internet near light speed:

Digital information such as internet packets travel at 2/3of the speed of light on copper wire and on fiber optic

cables

Light speed is 300,000 km/sec

Internet (Features)

4) Universal internet access:

Page 93: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 93/100

93

4) Universal internet access:

Gives same powerful capabilities to everyone who has

connected and accessing the internet

Internet (Features)

5) Internet Growth rate:

Page 94: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 94/100

94

5) Internet Growth rate:

Depends upon three directions

a) size:

more than half the world’s population now using internet

b) Power:

more powerful software's have been developed

c) Functionality:

new software's and new browser’s

Page 95: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 95/100

Internet (Features)

7) Internet freedom of speech:

Page 96: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 96/100

96

7) Internet freedom of speech:

Common area, Public place like village.

Any thing that any body wishes to say can be heard by

anyone else connected to internet.

 Web Browser

A web Browser display a web documen

t and enables users

Page 97: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 97/100

97

A web Browser display a web document and enables users

to access linked documents

When the user chooses a hyperlink, the browser originates a

message to a web server 

Browser also contains navigation tools

The first web browsers were “Text -only browsers”

first successful graphical browser, mosaic

Developed by the “National center for supercomputing

Application” (NCSA)

 Web server

A web server is a program that waits for

browsers to request

Page 98: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 98/100

98

A web server is a program that waits for browsers to request

a web page.

When the server receives request for a specific resource, it

looks for the requested file & sends it to the browser 

Networks and the Internet

What is the World Wide Web (WWW)?

Page 99: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 99/100

99

What is the World Wide Web (WWW)?

A Web site is

a collection of 

related Web pages

A Web site is

a collection of 

related Web pages

A Web page contains

text, graphics, sound,

video, and links to

other Web pages

A Web page containstext, graphics, sound,

video, and links to

other Web pages

You can share

information by

creating Web pagesor posting photos on

a photo community

You can share

information by

creating Web pages

or posting photos on

a photo community

Billions of documents, called Web pages, available to

anyone connected to the Internet

Page 100: Computer System and Prog

8/6/2019 Computer System and Prog

http://slidepdf.com/reader/full/computer-system-and-prog 100/100

100

Prepared by: Adam Khan