You are on page 1of 32

CS 680 : Computer Programming

(Core Course - 12 Credits)

Lecturer
Instructor : Kennedy
E-mail: kenfactz@gmail.com

1
Module 1: An Overview of Computers and
programming Languages

In this chapter, you will:


 Learn about different types of computers
 Explore the hardware and software components of a computer system
 Learn about the language of a computer
 Learn about the evolution of programming languages
 Examine high-level programming languages
 Discover what a compiler is and what it does
 Examine how a high-level language program is processed
 Learn what an algorithm is and explore problem-solving techniques
 Become aware of structured design and object-oriented design
programming methodologies
 Become aware of Standard C++ and ANSI/ISO Standard C++
Lecture 1: Introduction to computers
Introduction to computers

 A Computer is an electronic device that can perform activities that


involve Mathematical, Logical and graphical manipulations.
Generally, the term is used to describe a collection of devices that
function together as a system.
 It performs the following three operations in sequence.
 It receives data & instructions from the input device.
 Processes the data as per instructions.
 Provides the result (output) in a desired form
Basic Elements of a Computer System

 Basic elements of a computer system are Mouse, Keyboard,


monitor, memory, CPU, motherboard, Hard Disk, Speakers,
Modem, power supply and processor
 Mouse is used for operating the system. Nowadays, optical mouse
is more popular as compared to simple mouse.
 Keyboard is used to input data in to the system so that the system
gives output to the user. Therefore, the keyboard is an integral
part of the input system. A computer is essentially incomplete
without a keyboard.
 Monitor, which again is a very essential part of the computer
system, displays the actions that the computer performs on our
command.
Basic Elements of a Computer System

 Motherboard again a necessary element of the computer system


contains different elements as memory, processor, modem, slots
for graphic card and LAN card
 Hard disk is used to store data permanently on computer.
 Modem is used to connecting to the Internet. Two types of
modems are widely used. One is known as software modems and
the other is known as hardware modems.
 Speakers are also included in basic elements of a computer. It is
not indispensable, because a computer can perform its function
without speakers. However, we use them to for multiple purposes
Basic Elements of a Computer System

Mouse Keyboard Monitor

Motherboard Hard disk Modem


Basic Computer Functioning

 A computer can be defined as an electronic device that accepts


data from an input device, processes it, stores it in a disk and
finally displays it on an output device such as a monitor.
 To understand the basic rudiments of the functioning of the
computer refer to the basic block diagram of a computer as shown
in figure next slide.
 This flow of information holds true for all types of computers such
as Personal Computers, Laptops, Palmtops etc. In other words,
the fundamental principle of working is the same
Basic Computer Functioning

As shown in Fig, there are four main building blocks in a computer's


functioning input, processor (CPU), output and memory
Basic Computer Functioning

 The data is entered through input devices like the keyboard, disks
or mouse. These input devices help convert data and programs
into the language that the computer can process.
 The data received from the keyboard is processed by the CPU,
i.e. the Central Processing Unit. The CPU controls and
manipulates the data that produce information.
 The CPU is usually housed within the protective cartridge. The
processed data is either stored in the memory or sent to the output
device, as per the command given by the user.
 The memory unit holds data and program instructions for
processing data.
 Output devices translate the processed information from the
computer into a form that we can understand
Advantages of Computers

 High speed: Computers have the ability to perform routine tasks


at a greater speed than human beings. They can perform
millions of calculations in seconds.
 Accuracy: Computers are used to perform tasks in a way that
ensures accuracy.
 Storage: Computers can store large amount of information. Any
item of data or any instruction stored in the memory can be
retrieved by the computer at lightning speeds.
 Automation: Computers can be instructed to perform complex
tasks automatically (which increases the productivity).
 Diligence: Computers can perform the same task repeatedly &
with the same accuracy without getting tired.
Advantages of Computers

 Versatility: Computers are flexible to perform both simple and


complex tasks.
 Cost effectiveness: Computers reduce the amount of paper work
and human effort, thereby reducing costs.
Generations of computers

The development of computers has followed different steps in the


terminology used and these steps of technological differences
are called as GENERATIONS in computer terminology. There are
totally five generations of computers till today
1. First Generation Computers (1950's): These computer which
used vacuum tubes (valves) as major electronic component the
advantage of vacuum tubes technology is that it made the advent
of Electronic digital computer vacuum tubes were only electronic
devices available during those days which made computing
possible
Generations of computers

2. Second Generation Computers (1960's): With the development


of Transistors and there use in circuits, magnetic core for
memory storage, the vacuum tubes are replaced by transistors to
arrive at 2nd generation of computers. The size of transistors is
much smaller when compared to vacuum tubes, they consume
less power, generated less heat and faster and reliable.
Advantages:
Size of Computer has come down as well as power
consumption.
The Cost of Computer reduced
Generations of computers

3. Third Generation Computers (1970's): The development of


silicon chips, the third generation of computers came into
existence. These computers are used Integrated Circuits (IC's) of
silicon chips, in the place of transistors. Each of these IC’s
consisting of large number of chips in very small packages
Advantage:
 The size of computers, cost, heat generation and power
consumption decreased to great extent, speed and reliability
increased as compared to previous generation. These
machines used IC's with large scale Integration (LSI).
4. Fourth Generation (1980's): The Computers belonging to these
generations used Integrated circuits with Very Large Scale
Integration (VLSI).
Generations of computers

Advantages:
These computers have high processing powers, low
maintenance, high reliability and very low power consumption.
The size & cost of computers come down drastically
5. Fifth Generation (Late 1990's) :- These computers use optic
fiber technology to handle Artificial Intelligence, Expert systems,
Robotics etc., these computers have very processing speeds and
are more reliable.
Generations of computers
Classification of computers

Computers in general can be classified into major categories based


on.
1) According to the purpose of the computer.
2) According to the operation size of computer
1) Classification as per purpose of the Computer : Classification of
digital computer as per the purpose of their use
a) General purpose digital computers.
b) Special purpose digital computer.
a) General Purpose digital Computers: These computers are
theoretically used for any type of applications. These computers can
be used in solving a business Problem and also used to solve
mathematical equation with same accuracy and consistency. Most of
the computer now is general purpose digital computers. All the
P.C's, which have become household affair
Classification of computers

b) Special Purpose Computers: These digital computers are designed,


made and used for any specific job. These are usually used for
those purposes which are critical and need great accuracy and
response like Satellite launching, weather forecasting etc.
2) Computers are classified according to the storage capacity,
speed and the purpose for which they are developed. These can
be classified into three types
a) Analog Computes
b) Digital Computers
c) Hybrid Computers
Classification of computers

a) Analog computers: They operate by measuring instead of


counting. The name (derived from Greek word analogy) denotes
that the computer functions by establishing similarities between
the two quantities. They are powerful tools for solving
differential equations.
b) Digital Computers: These computers operate by counting. All
quantities are expressed as discrete digits or numbers. These
are useful for evaluating arithmetic expressions and
manipulations of data.
c) Hybrid Computers: Computers which combine the features of
analog and digital computers are known as Hybrid computers.
Classification of computers

 Classification of computer according to size and capabilities


a) Super Computers
b) Main frame Computer
c) Medium scale Computer
d) Mini Computers
e) Micro Computers.
Classification of computers

a) Super Computers:
These computers are characterized as being the fastest, with
very high processing speed, very large size, most powerful.
There are widely used in complex scientific applications like
processing geological data, weather data, genetic engineering
etc.
These computers with 16 microprocessors will recognize words
up to length 64 bits and more. The speed of calculation is up to
1.2 billion instructions/second, and they can take input from more
than 1000 individual work station. Ex. PARAM developed in India
Classification of computers

b) Main frame Computer


These Computer will has capability to support many peripheral
devices and terminals, which can process several Million
Instructions / second (MIPS), as well which support 1000 remote
systems, these computers are mostly used for Railway
reservation etc
c) Medium scale Computer
These computers are mini versions of mainframe computers; they
are relatively smaller than mainframes and have less processing
power than Mainframes their processing speed support up to 200
remote systems.
Classification of computers

d) Mini Computers
These computers are smaller and less experience than
Mainframe and medium sized computers. They are relatively
faster it can support about 10-20 user terminals. These computers
are generally easy to use. They can handle database, statistical
problems Accounting etc.
e) Micro Computer
These are the mostly used category of computes called as
personal computers (PC's). The word Micro suggests only the
size, but not the capacity. They are capable to do all input -
output operations.
They can also be connected to peripheral devices.
Anatomy of Computers:

Major Components of Computer


 Computer is basically composed of essentially the following:
1) Hardware
2) Software
Hardware

 Hardware: Computer hardware is the collection of various physical


components of the computer, like the computer itself, the input-output
devices..
CPU – Centre Processing Unit

 Control Unit - It has three main functions.


1) Fetch and decode the instruction.
2) Control the flow of information (instruction or data) in and out of MM.
3) Control the operation of the internal components of CPU.
 Program Counter (PC) points to the next instruction to be
executed.
 Instruction Register (IR) holds the instruction that is currently
being executed.
 Arithmetic Logic Unit (ALU). This component is responsible for
carrying out all arithmetic and logical operations.
 Accumulator (ACC). Once ALU performs the operation the results
are placed in ACC.
Main Memory

 Directly connected to the CPU.


 All programs must be loaded into MM before they can be
executed.
 All data must be brought into MM before it can be manipulated.
 When the power of the computer is turned off every thing in the
main memory is lost for good.
Secondary storage

 Everything in main memory is lost when the computer is turned


off.
 Information stored in main memory must be transferred to some
other device for permanent storage.
 The device that stores information permanently is called
secondary storage.
 Examples of secondary storage are hard disks, USB flash, Zip
disks, CD-ROMs, and tapes.
Input/Output devices

 For a computer to perform a useful task, it must be able to take


in data and programs and display the results of calculations.
 The devices that feed data and programs into computers are
called input devices.
 The keyboard, mouse, and secondary storage are examples of
input devices.
 The devices that the computer uses to display results are called
output devices.
 A monitor, printer, and secondary storage are examples of output
devices.
Software

 Software are programs written to perform specific tasks.


 Two types of software
 System software - programs that take control of the
computer.
 Application software - programs that perform a specific task.
(Word processors, spreadsheets, and games are examples
of application programs.)
End of Lecture one

You might also like