35
Basics of Computer & ‘C’ Basics of Computer & ‘C’ programming programming (CMP 104) (CMP 104) Introduction to Computers and Computer Generation

Cmp104 lec 1

Embed Size (px)

Citation preview

Page 1: Cmp104 lec 1

Basics of Computer & ‘C’ Basics of Computer & ‘C’ programming programming

(CMP 104) (CMP 104)

Introduction to Computers and Computer Generation

Page 2: Cmp104 lec 1

What Is Computing?What Is Computing?

Computing is an activity that needs◦ computers to perform a task, or◦create Computers.

12/04/23

Page 3: Cmp104 lec 1

Tasks Tasks • Designing and building hardware systems.• Designing and building software systems.• Processing, structuring, and managing

information; • Doing scientific research using computers; • Creating Intelligent systems; • Creating and using communications media; • Creating and using entertainment media;The list is endless, and the possibilities are

vast.

12/04/23

Page 4: Cmp104 lec 1

Computer Definition Computer Definition

A computer is an electronic device, operating under the control of instructions (software) stored in its own memory unit, that can accept data (input), manipulate data (process), and produce information (output) from the processing.

Generally, the term is used to describe a collection of devices that function together as a system.

12/04/23

Page 5: Cmp104 lec 1

Block Diagram along with Block Diagram along with Computer Component !Computer Component !

5

Input Processing Output

Page 6: Cmp104 lec 1

Components of ComputerComponents of Computer

The basic components of a computer are:

Input UnitOutput UnitMemory / Storage UnitArithmetic Logic UnitControl UnitCentral Processing Unit

6

Page 7: Cmp104 lec 1

7

When a computer is asked to do a job, it handles the task in a very special way:

1)It accepts the information from the user. This is called input.

2)It stores the information until it is ready for use. The computer has memory chips, which are designed to hold information until it is needed.

3)It processes the information. The computer has an electronic brain called the Central Processing Unit, which is responsible for processing all data and instructions given to the computer.

4)It then returns the processed information to the user. This is called output.

Page 8: Cmp104 lec 1

Input UnitInput UnitInput Unit accepts the instructions

and data from the outside world. Then it converts these instructions

and data in computer acceptable form.

After that it supplies the converted instructions and data to the computer system for further processing.

8

Page 9: Cmp104 lec 1

Memory UnitMemory Unit

The Memory Unit is the part of the computer that holds data and instructions for processing.

Memory associated with the CPU is also called primary storage, primary memory, main storage, internal storage and main memory.

There are two types of memory inside the computer:

1.Primary Memory2.Secondary Memory

9

Page 10: Cmp104 lec 1

MEMORYMEMORYPrimary Memory-- Primary

storage or memory: Is where the data and program that are currently in operation or being accessed are stored during use.

Secondary Memory-- Stores instructions and data between sessions◦A file stores data or instructions in

secondary memory

12/04/23

Page 11: Cmp104 lec 1

Primary MemoryPrimary Memory◦Consists of electronic circuits:

Extremely fast and expensive.◦Two types:

RAM (non-permanent) Programs and data can be stored here for the

computer’s use. Volatile: All information will be lost once the

computer shuts down.

ROM (permanent) Contents do not change.

12/04/23

Page 12: Cmp104 lec 1

Secondary MemorySecondary MemoryA computer might have any of these

types of secondary memory◦ Hard disk

Fast Fixed in the computer and not normally removed

◦ Floppy disk Slow Easily shared with other computers

◦ Compact disk Slower than hard disks Easily shared with other computers Can be read only or re-writable

12/04/23

Page 13: Cmp104 lec 1

Central Processing Central Processing Unit(CPU)Unit(CPU)

The control unit(CU) and ALU of a computer system are jointly known as the CPU.

The CPU is the brain of computer system.An arithmetic logic unit (ALU) is a digital

circuit that performs arithmetic and logical operations.

The ALU is a fundamental building block of the central processing unit (CPU) of a computer.

13

Page 14: Cmp104 lec 1

Control UnitControl UnitThe control unit (control system or

central controller) directs the various components of a computer.

It reads and interprets (decodes) instructions in the program one by one.

The control system decodes each instruction and turns it into a series of control signals that operate the other parts of the computer.

14

Page 15: Cmp104 lec 1

Output UnitOutput UnitThe output unit is just reverse of the

input unit. It accepts the result produced by

computer, which are in coded form and can't be easily understood by us.

Then it converts these coded result into human readable form.

After that it supplies the converted results to the outside world.

15

Page 16: Cmp104 lec 1

Primary storage Primary storage (memory)(memory)

0 1 2 3

0

1

2

3

4

5

6

7

8

9

Data Segment

Code Segment

Colum #Row #

ADDRESS

(2,0)(2,0)

(9,2)(9,2)

(Row #, Col 3)

(4,3)(4,3)

Data

Code : Add content of address (2,0) and content of address (4, 3) and store the result at (3,2) i.e. replace the C(3,2) by C (2,0)+C(4,3) .

(3,2)

C (2,0)+C(4,3) C(3,2)

12/04/23

Page 17: Cmp104 lec 1

Store the data item 50 at Store the data item 50 at address (2,0)address (2,0)1. Ask the input device to take

the number 50 and send it to the main memory.

2. Ask the control unit to store it in the data segment at memory cell address (2,0).

12/04/23

Page 18: Cmp104 lec 1

Store the data item 60 at Store the data item 60 at address (4,3)address (4,3)3. Ask the input device to

take the number 60 and send it to the main memory.

4. Ask the control unit to store it in the data segment at memory cell address (4,3).

12/04/23

Page 19: Cmp104 lec 1

Store the instruction C Store the instruction C (2,0)+C(4,3) (2,0)+C(4,3) C(3,2) at C(3,2) at address (9,2)address (9,2)5. Ask the input device to take

the instruction C (2,0)+C(4,3) C(3,2) and send it to the main memory.

6. Ask the control unit to store it in the code segment at main memory cell address (9,2).

12/04/23

Page 20: Cmp104 lec 1

Instruction executionInstruction execution

Ask the control unit to ask the ALU to execute the instruction given at the cell address (9,2).

12/04/23

Page 21: Cmp104 lec 1

ALU Executes C (2,0)+C(4,3) ALU Executes C (2,0)+C(4,3) C(3,2) C(3,2)• Takes 50 from the cell (2,0) and

keeps it in his blue cell • Takes 60 from the cell (4,3) and

keeps it in his red cell • Adds contents of blue and red cells

and keeps the result in green cell +

• Asks control unit to send (store, copy, …) the content of green cell into the data segment cell at address (3,2)

50

60

50 60 110

12/04/23

Page 22: Cmp104 lec 1

Step-by-Step Execution Step-by-Step Execution ProcessProcess

0 1 2 3

0

1

2

3

4

5

6

7

8

9

Data Segment

Code Segment

Colum #Row #

ADDRESS

(2,0)(2,0)

(9,2)(9,2)

(Row #, Col 3)

(4,3)(4,3)

Code : Add the content of the address (2,0) and the content of the address (4, 3) and store the result at (3,2) i.e. replace the C(3,2) by C (2,0)+C(4,3) .

(3,2)

50 6

0

50 60 110

110

12/04/23

Page 23: Cmp104 lec 1

What What characteristics characteristics computers have?computers have?• Automatic: It is automatic because

a computer works by itself without much human intervention.

• Speed :As compared to human, a computer works at a very high speed. Speed is measured in millisecond (10-3) but in microseconds (10-6), nanoseconds (10-9), picoseconds (10-12). A computer can perform several billions (109) operations like +, -, / … per second.

12/04/23

Page 24: Cmp104 lec 1

What What characteristics characteristics computers have?computers have?Accuracy : Computers are very

accurate but accuracy depends on their hardware and software design, and the correctness of the input data. Remember! Garbage in garbage out.

Diligence: Computers work diligently meaning they perform their task , from start to end, with uniform accuracy and speed.

12/04/23

Page 25: Cmp104 lec 1

What What characteristics characteristics computers have?computers have?• Versatility: Computers are

versatile because they can perform different types of tasks.

• Power of remembering: Computers can store and recall (retrieve) a large number of data and extract information from them.

• No Feeling or emotions: Computers do not have feeling or emotions yet.

12/04/23

Page 26: Cmp104 lec 1

Computer GenerationsComputer GenerationsEach generation of Computer is characterized

by a major technological development that fundamentally changed the way computers operate, resulting in smaller, cheaper, more powerful and more efficient and reliable devices.

The various generations of computers an listed below

First Generation(1946-1954)Second Generation(1955-1964)Third Generation(1965-1977)Fourth Generation(1978-1991)Fifth Generation(1992-continued)

Page 27: Cmp104 lec 1

First Generation(1946-1954)First Generation(1946-1954)The digital computes using electronic valves

(Vacuum tubes) are known as first generation computers.

They stored information in the form of propagating sound waves.

Some of the computers of this generation were:1.Mark I ( IBM Automatic Sequence Controlled Calculator (ASCC))1.ENIAC: Electronic Numerical Integrator and

Calculator developed in 19462.EDVAC: It stands for Electronic Discrete Variable

Automatic Computer developed in 19503.EDSAC: It stands for Electronic Delay Storage

Automatic Computer developed in 1949.4.UNIVAC-1: Universal Accounting Computer in

1951.

Page 28: Cmp104 lec 1

LimitationsLimitations1. They used valves or vacuum tubes as their

main electronic component. 2. They were large in size, slow in processing

and had less storage capacity.3. They consumed lots of electricity and

produced lots of heat. 4. Their computing capabilities were limited. 5. They were not so accurate and reliable.6. They used machine level language for

programming. 7. They were very expensive.

Page 29: Cmp104 lec 1

Second Generation (1955-Second Generation (1955-1964)1964)They used transistors for CPU components , ferrite

cores for main memory & magnetic disks for secondary memory. They used high-level languages such as FORTRAN (1956), ALGOL (1960) & COBOL (1960 – 1961).

In this generation concept of Central Processing Unit (CPU), memory, programming language and input and output units were developed.

Some of the computers of the Second Generation were 1. IBM 1620: Its size was smaller as compared to First

Generation computers and mostly used for scientific purpose.

2. IBM 1401: Its size was small to medium and used for business applications.

3. CDC 3600: Its size was large and is used for scientific purposes.

Page 30: Cmp104 lec 1

FeaturesFeatures1.  Transistors were used instead of

Vacuum Tube.2.  Processing speed is faster than First

Generation Computers (Micro Second)3.  Smaller in Size.4. The input and output devices were

faster. Example: IBM 1400 and 7000 Series,

Control Data 3600 etc.

Page 31: Cmp104 lec 1

Third Generation(1965-Third Generation(1965-1977)1977)This generation made use of IC’s.

These ICs are popularly known as Chips and a small chip consist of the capacity of the 300 transistors.

Higher level language such as BASIC (Beginners All purpose Symbolic Instruction Code) was developed during this period. 

Some of the computers developed during this period were IBM-360, ICL-1900, IBM-370, and VAX-750.

Page 32: Cmp104 lec 1

FeaturesFeatures1. They used Integrated Circuit (IC)

chips in place of the transistors.2. Semi conductor memory devices

were used.3.  The size was greatly reduced, the

speed of processing was high, they were   more accurate and reliable.

4. The mini computers were introduced in this generation.

5. They used high level language for programming.

Page 33: Cmp104 lec 1

Fourth Generation(1978-Fourth Generation(1978-1991)1991)An IC containing about 100 components is called

LSI (Large Scale Integration) and the one, which has more than 1000 such components, is called as VLSI (Very Large Scale Integration).

It uses large scale Integrated Circuits (LSIC) built on a single silicon chip called microprocessors.

Due to the development of microprocessor it is possible to place computer’s central processing unit (CPU) on single chip. These computers are called microcomputers.

Keyboards, dot matrix printers etc. were developed. OS-such as MS-DOS, UNIX, Apple’s Macintosh

were available.The personal computer (PC) is a Fourth Generation

Computer

Page 34: Cmp104 lec 1

FeaturesFeatures

1.  They used Microprocessor (VLSI) as their main switching element. 2. They are also called as micro computers or personal computers.3.  Their size varies from desktop to laptop or palmtop. 4.  They have very high speed of processing; they are 100% accurate, reliable,   diligent and versatile.5.  They have very large storage capacity.Example: IBM PC, Apple-Macintosh etc.

Page 35: Cmp104 lec 1

Fifth Generation(1992-Fifth Generation(1992-Continued)Continued)It uses ULSI (Ultra-Large Scale Integration)

chips. Millions of transistors are placed in a single IC in ULSI chips.

64 bit microprocessors have been developed during this period.

Memory chips and flash memory up to 1 GB, hard disks up to 600 GB & optical disks up to 50 GB have been developed.

Some technological developments that could make more development of fifth generation computers possible, include:-

Parallel ProcessingSuper ComputersEfficient Speech Recognition system