Professional Documents
Culture Documents
INTRODUCTION
Introduction to computers Computer Software Software development
life cycle - Need for studying Computer Programming Languages - Problem
Definition and Analysis -Flow Chart, Developing algorithm - Procedural
Programming (modular and structural)- Program compilation, execution,
debugging, testing - C program development environment.
What is computer?
A Computer is an electronic device used for performing calculations and
controlling operations that can be expressed either in logical or numerical terms.
It performs diverse operations using instructions to process the information in
order to achieve the desired results.
CHARACTERISTICS OF COMPUTER:
Speed
Computers processed data at an extremely fast rate millions of
instructions per second
The speed of a computer is calculated in megahertz(MHz) i.e one
million instruction per second.
A powerful computer can perform billions of operations in one
second
Accuracy
Level of accuracy depends on the instructions and the type of
machine being used
Faulty instructions for data processing in computer may produce
faulty results whish is termed as Garbage In Garbage Out
Diligence
Computers does not suffer from human traits of tiredness and lack of
concentration
The computer will perform the millions of calculations with the
same accuracy and speed as the first calculation
Reliability
Measurement of performance of a computer
The computer will perform the operations without any failure at the
hardware level
Storage Capability
Computers can store large amounts of data and it can be retrieved
easily
Main memory- holds only small amount of information
Hence the data can be stored on secondary storage devise such as
magnetic tapes, magnetic disc
Versatility
Computers are versatile in nature
It can perform multiple tasks simultaneously by changing the
programs(computer instruction)
Resource Sharing
Computers connected with each other can able to share the data
,information and the resources like printers among themselves.
EVOLUTION OF COMPUTER
No
1
Year
Inventors
Invention
Asian Minor Abacus
Purpose
Performs
calculations using
sliding beads
arranged on a rack
Uses 8 movable
dials upto sum 8
figures
1642
Blaise
Pascal
pascaline(first
functional
automatic
calculator)
1694
Gottfried
Wilhem Von
Leibniz
Stepped Reckoner
performs
multiplication(using
repeated addition),
division, square
root
1822
Charles
Babbage
Difference engine
perform differential
equations, stores the
program and print
the result
automatically
1833
analytical engine
fully functional
2
difference engine
and it
stores 1000
numbers upto 50
decimal digits long
6
1889
Herman
Hollerinth
cards
1944
Mark I
Military purpose
1946
Harcard
Aiken and
IBM
John Eckert
and John
Mauchly
ENIAC(Electronic
Numerical
Integrator and
Calculator)
EDVAC
(Electronic Discrete
Variable Automatic
Computer)
EDSAC
(Electronic Delay
Storage Automatic
Calculator)
Eckert and
Mauchly
10
1949
Maurice
Wilkes
11
1951
John Eckert
and John
Mauchly
12
1960s
13
1970
14
1980s
First electronic
computer and uses
the concept of
stored program
Used mercury delay
lines for mercury
and Vaccum tubes
for logic
UNIVAC(Universal
Automatic
Computer)
LARC(Livermore
Access time is less
than one micro
second and capacity
of 100,000,000
words
ICs(Integrated
Components for
Circuits)
offices
Introduction of
personal computers
VLSI(Very Large
Scale Integration)
GENERATIONS OF COMPUTERS:
First Generation (1940-1956): Vaccum Tubes
The computers used Vaccum tubes for circuitry and magnetic drums
for memory
Magnetic drum-metal cylinder coated with magnetic iron oxide
material
Input-punched cards and paper tape
Output-printouts
Used binary coded language(0s and 1s)-to perform operations and
to solve the problem
These computers result in lack of versatility and speed
Ex:ENIAC,EDVAC,UNIVAC
Characteristics
These computers were based on vaccum tube technology
Fastest computing devices-computation time(milliseconds)
Size-very large and requires large space for installation
Generates a lot amount of heat and hence air conditioning is required
Non-portable
Very expensive and use large amount of electricity
Unreliable and prone to frequent hardware failure
Since machine language was used, these computers were difficult to
program and use
Second Generation(1956-1963): Transistors
Transistor-made up of semiconductor material like germanium and
silicon
It consist of three leads and perform functions such as
voltage,current or power amplification with low power
These computers became smaller,faster,cheaper,energy efficient and
more reliable
Magnetic core- primary memory
Magnetic disk- secondary memory
Input-punched cards
Output-print out
Assembly language is used
Ex:PDP-8,IBM 1401
4
Characteristics
These computers were based on transistor technology
Size-smaller compared to first generation computers
Computation time-microseconds
Portable and generates less amount of heat
Reliable and less prone to hardware failure
Requires air conditioning
Third Generation(1963-1970):Integrated Circuits
IC-a single chip with many components such as transistors and
resistors fabricated on it
Smaller in size reliable and efficient
User interaction through keyboard and monitors
These computers allow many different applications to run at a time
with a central program that monitored the memory
Ex:NCR 395,B 6500
Characteristics:
These computers were based on IC technology
Portable and more reliable
Computation time nanoseconds
Consumes less power and generates less heat
Air conditioning was still required
Extensive use of high level languages became possible
Maintenance cost- low
Commercial production easier and cheaper
Fourth Generation(1970-Present): Microprocessor
The technology of these computers are based on
microprocessor(circuits containing millions of transistors)
All components of computer(CPU, memory, input and output
controls )are located on a small chip
VLSI(Very Large Scale Integration) technology allowed hundreds of
thousands of components onto a single chip
They are more powerful, compact and reliable
Magnetic core memory are replaced by semi conductor memories
Development of GUI(Graphical User Interface), mouse and hand
held devices
Characteristics:
Fourth generation computers are microprocessor based system
These computers are very small
Cheapest among all the other generations
5
CLASSIFICATION OF COMPUTERS
Based on physical size, performance and application areas, the computers
are divided into four major categories:
1. Micro computers
2. Mini computers
3. Mainframe computers
4. Super computers
Micro computers
It is a small, low cost digital computer usually consists of a
microprocessor, storage unit, an input channel and an output
channel, which all may be on one chip inserted into one or several
PC boards
Also it includes power supply, connecting cables, keyboard, monitor,
printer, disk drives, an operating system and other software
programs
It is generally the smallest of the computer family
Designed for individual users only, nowadays used to serve more
than one user
Ex: IBM-PC Pentium 100, IBM-PC Pentium 200 and Apple
Machintosh
It includes
Desktop
Laptop
Hand held models
Desktop computers
Also known as Personal Computer(PC)
Developed for individual users
These micro computers consist of system unit, keyboard, monitor,
printer, hard disk storage and other peripheral devices
They are not very expensive
Manufacturers: Apple, IBM, Dell and HP
Laptop computers
Also known as notebook
It is a portable computer, user can carry it around
It encloses all the basic features of a normal desktop computer
One can use laptop computer anywhere and at any time
Needs external power supply, contains rechargeable battery
These computers are expensive compared to desktop computers
Hand-held computers
Also called as Personal Digital Assistant(PDA) or palmtop
computers
These are small portable computers that are slightly bigger than the
common calculators
A PDA user uses a pen or an electronic stylus, instead of a keyboard
Usually they have no disk drive, instead they use small cards to store
programs and data
Connected to a printer or disk drive to generate output or store data
Limited memory and are less powerful as compared to desktop
computers
Ex: Apple Newton, Casio Cassiopeia and Franklin eBookMan
Mini computers
It is a small digital computer, also called as mid-range computer
Process and storage capacity of mini computer is lesser than that of
mainframe but more than that of a micro computer
Designed for multiple users, supports 4 to 200 simultaneous users
It serves as a centralized store house(network server) for a cluster of
work stations
Used in interactive applications in industries, research organizations,
colleges and universities
Also used for real time controls and engineering design works
Ex: PDP 11, IBM (8000 series) and VAX 7500
Mainframe computers
A Mainframe computer is an ultra high performance computer made
for high value, processor intensive computing.
It is very faster than mini computer and second largest(both
capability and size) of the computer family
It executes many programs simultaneously at a high speed whereas
super computers are designed for single processes
It is used by large business and for scientific purposes
Eg: IBMs ES000, VAX 8000 and CDC 660
Super Computers
Super computers are special purpose machines which are specially
designed to maximize the number of Floating Point Operations Per
Second(FLOPS).
Any computer below one gigaflop per second is not considered as
super computer
8
APPLICATIONS OF COMPUTERS
Some of the areas where computers are being used
Science
To generate detailed studies of how earthquakes affect buildings or
pollution affects weather pattern
Education
Whole process of education
Interactive learining- computer aided education(CAE) and computer based
training(CBT)
Medicine and Health Care
Used for diagnosing illness and to monitor the patients status suring
complex surgery
Engineering/Architectural/Manufacturing
Computer Aided Manufacturing(CAM) can be used in designing products,
ordering parts and planning production
Entertainment
Controlling images and sounds
Used in animation and colourful graphics
Communication
E-mail transferring messages between sender and the recipient
Messages can be read and can save it, reply it, forward it or delete it from
the computer
Business Application
Used in business forecasting,to prepare pay bills and personal
records,banking operations,etc
Publishing
Desktop publishing(DTP)-performs the publishing job all by oneself
Banking
Automated Teller Machine(ATM) services provided with 24 hours of the
day to deposit and withdraw cash
9
HARDWARE
All visible devices that are assembled together builds a computer
system
It includes input devices, CPU, output devices and memory
INPUT DEVICES
Input devices are electromechanical devices that allow the user to
feed information into the computer for analysis, storage and to give
commands to CPU
10
Data and instructions are entered into the memory of the computer
through input devices
The computer acceps input in two ways-either manually(using
keyboard and mouse) or directly(like barcode)
Input devices: keyboard,mouse,joystick,scanners
CENTRAL PROCESSING UNIT
CPU is referred to as the brain of the computer
Hardware within a computer that carries out the instructions of
a computer program by performing the basic arithmetical, logical,
and input/output operations of the system.
Two typical components of a CPU are the arithmetic logic
unit (ALU), which performs arithmetic and logical operations, and
the control unit (CU), which extracts instructions from memory and
decodes and executes them, calling on the ALU when necessary.
REGISTERS
A register is a small amount of storage available as part of a CPU
Registers provide the fastest way to access data.
OUTPUT DEVICES
An output device is any peripheral that receives or displays output
from a computer, examples are: Monitor, Printer, Projector, Sound
card, Speakers and Video card.
MEMORY SYSTEM
There are two kinds of computer memory: primary and secondary .
Primary memory is accessible directly by the processing unit.
RAM is an example of primary memory.
As soon as the computer is switched off the contents of the primary
memory is lost.
You can store and retrieve data much faster with primary memory
compared to secondary memory.
Secondary memory such as floppy disks , magnetic disk , etc., is
located outside the computer.
Primary memory is more expensive than secondary memory.
Because of this the size of primary memory is less than that of
secondarymemory.
11
12
Language translators
Computers understand the machine language in the form of 0s and 1s
A tool is required to translate a program written in a programming language
to machine language
Hence language translator was developed
Three categories of language translators
Compilers
Interpreters
Assembler
Compiler The programs written in any high-level programming language are
converted into machine language using a compiler
Interpreters an interpreter analyzes and executes the source code in a line by
line manner without looking at the entire program
Advantage: executes the program spontaneously
Assembler-the assembly language program must be translated into machine code
by a separate program called an assembler
Assembly language symbolic representation of machine code
System Utility
Used to support, enhance and secure existing programs and data in the
computer system
Common types of utility programs:
Hardware utilities
Virus-detection and recovery utilities
File-compression utilities
Spam and pop-up blocker utilities
APPLICATIONS SOFTWARE
An application program is the type of program that you use once the
operating system has been loaded.
An application program is a single program or a collection of programs
called a software package
Examples include word-processing programs, spreadsheets and databases
Word processing applications
Microsoft Word
Lotus Word Pro
WordPerfect
13
Spreadsheets
Microsoft Excel
Lotus 123
Database management system
Microsoft Access
Lotus Approach
Image editor
Adobe photoshop
Corel draw
Presentation tools
Microsoft PowerPoint
Lotus Freelance
Desktop publishing
Abode Pagemaker
Quark Express
Multimedia applications
Microsoft's Encarta CD-ROM based encyclopedias
SOFTWARE DEVELOPMENT LIFE CYCLE
What is SDLC?
SDLC is a process followed for a software project, within a software
organization. It consists of a detailed plan describing how to develop, maintain,
replace and alter or enhance specific software. The life cycle defines a
methodology for improving the quality of software and the overall development
process.
A typical Software Development life cycle consists of the following stages:
holders. Meetings with managers, stake holders and users are held in order to
determine the requirements like; Who is going to use the system? How will they
use the system? What data should be input into the system? What data should be
output by the system?
2. Task Analysis
Defines needed information, function, behavior, performance and interfaces.
3. Designing Phase
A design approach clearly defines all the architectural modules of the product
along with its communication and data flow representation with the external and
third party modules (if any).
4. Testing the Algorithm for Accuracy
This stage is usually a subset of all the stages as in the modern SDLC models,
the testing activities are mostly involved in all the stages of SDLC. However this
stage refers to the testing only stage of the product where products defects are
reported, tracked, fixed and retested, until the product reaches the quality
standards defined in the SRS
5. Coding
Testing is the process of evaluating a system or application, to check whether
the application meets all requirements of the client and to detect the errors.
6. Test and Debug the Program
In the testing phase, the results of the implementation phase are run through a
series of tests to verify that it functions and that it meets goals of the requirements
phase.
7. Documentation and Implementation
Once the program is free from all the errors, if the duty of the program
developers to ensure that the program is supported by suitable documentation.
After documentation, the program is installed on the end users system.
NEED FOR STUDYING COMPUTER PROGRAMMING LANGUAGES
Study of programming languages may also be considered as preparatory for
advance study in programming languages in several areas.
17
18
Only one flow line should enter a decision symbol. Two or three flow lines
may leave the decision symbol.
Only one flow line is used with a terminal symbol
Within standard symbols, write briefly. If necessary use the annotation
symbol to describe data or process more clearly
In case of complex flowcharts, connector symbols are used to reduce the
number of flow lines.
Intersection of flow lines should be avoided to make it a more effective and
better way of representing communication
Useful to test the validity of the flowchart with normal/unusual test data
Benefits of flowchart:
1) Makes logic clear:
Provides pictorial representation of the task which makes the logic
easier to follow.
Connection between the steps are clearly seen
Useful for visualizing fundamental control structures used in
programming
2) Communication:
Flowcharts are better way of communicating the logic of a
system
Diagrammatic representation of logic is easier to
communicate, as the users may not know the programming
techniques
3) Effective analysis:
Problem can be analyzed in an effective way
4) Useful in coding:
Flowcharts act as a guide during the analysis and program
development.
Using flowcharts the programmers can plan the coding process
effectively
As a result error free programs are developed at a faster rate
5) Proper Testing and Debugging:
Flowchart helps in detecting the errors in a program
Developers can test the various data for a process
19
6) Appropriate documentation:
Flowcharts serve as a good program documentation tool
Used to know what the program actually does and how to use the
program
Limitations of flowchart:
Complex:
When a program is very large, the flowcharts may continue for many
pages which is hard to follow
It is difficult to draw the flowchart for a large program consisting of
thousands of statements
Costly:
Flowchart drawn for a huge application makes the cost factor of program
development to be high
Difficult to modify:
Any changes or modification of the flowchart requires redrawing the
entire logic again.
Redrawing a flowchart is complex.
No Update:
In the case of large programs flowcharts are not updated.
As a result logic used in the flowchart may not match with the actual
programs logic.
Pseudocode:
Pseudocode is made up of two words: Pseudo and code. Pseudocode means
imitation and code refer to instructions, written in normal English, but in a
structured way.
Pseudocode is not a real programming code, but it models and may look
like programming code.
Pseudocode uses plain English statements rather than symbols to represent
the process of a computer program. It is known as PDL (Program Design
Language).
20
Example 1: The Pseudocode given below calculates the area of the rectangle.
PROMPT the user to enter the height of the rectangle
PROMPT the user to enter the width of the rectangle
COMPUTE the area by multiplying the height with width
DISPLAY the area
STOP
Example 2:
If student's grade is greater than or equal to 60
Print "passed"
else
Print "failed"
Endif
Pseudocode uses some keywords to denote programming processes. Some of them
are:
Input: READ, OBTAIN, GET and PROMPT
Output:PRINT, DISPLAY and SHOW
Compute: COMPUTE, CALCULATE and DETERMINE
Initialize: SET and INITIALIZE
Add One: INCREMENT
Pseudocode Guidelines:
1. Statements should be written in simple English .
2. Steps must be understandable.
3. Pseudocode must be concise.
4. Each instruction should be written in a separate line.
5. Capitalize keywords such as READ, PRINT and so on.
6. Each set of instructions is written from top to bottom, with only one
entry and one exit.
7. It should follow for easy transition from design to coding in
programming language.
Benefits of the Pseudocode:
1. Language Independent. So the developer can express the design in plain
natural language.
2. It is easy to develop a program from Pseudocode than a flowchart.
3. It is easy to translate Pseudocode into a programming language.
4. Pseudocode is compact than flowchart.
Limitations of Pseudocode:
1. It does not provide visual representation of the programs logic.
2. There are no accepted standards for writing Pseudocodes.
21
22
23
PROGRAMMING PARADIGMS
Programming Paradigms refers to how a program is written in order
to solve a problem
Programming can be classified into three categories
1. Unstructured Programming
2. Structural Programming
3. Object oriented programming
1. Unstructured Programming
Unstructured style of programming refers to writing small
and simple programs consisting of only one main program
Providing input, processing and displaying output are done
within one program only
2. Structural Programming
using structured programming, a program is broken
down into small independent tasks that are small
enough to be understood easily, without having to
understand the whole program at once
each task has its own functionality and performs a
specific part of the actual processing
these tasks are developed independently, and each task
can carry out the specified task on its own, without the
help of any other task
when these task are completed, they are combined
together to solve the problem
structured programming can be performed in two ways
1. Procedural Programming
2. Modular Programming
1. Procedural Programming
Main
Procedure
Procedure
1
Procedure
2
Procedure
3
24
Program File2
Module 1
Program File3
Module 2
Program File 4
Module 3
Efficiency
It should utilize the least amount of memory and processing
time
Structural
A program is developed structurally, the program not only
becomes more readable, but the testing and documentation
process also gets easier
Flexibility
A program should be flexible enough to handle most of the
changes without having to rewrite the entire program
Generality
The program should be general. For example, if a program is
developed for a particular organization, then it should suit all the
other similar organizations.
Documentation
A well-documented application is also useful for
programmers because even in the absence of the author, other
programmers can understand it.
Programming Languages:
A programming language has to follow syntax rules to create an
accurate program so that the computer can yield desired results.
Types of Programming Languages
1. Machine Language
It is the native language of computers. It uses only 0s and 1s to
represent data and instructions.
2. Assembly Language
It corresponds to symbolic instructions and executable machine
codes and was created to use letters instead of 0s and 1s to run a
machine.
3. High Level Language
The programs written in high level languages are known as Source
Programs and these programs are converted into machine-readable
form by using compilers and interpreters.
Example:
.
26
27