You are on page 1of 7

COMPUTER HARDWARE AND SOFTWARE

1.1. Computer hardware: The term computer hardware refers to all physical devices,
which are visible to the user. The user can directly operate these devices. Computer hardware
includes input devices, output devices, processing devices and other peripheral devices. These
devices are required to be interconnected so that they can function properly to perform their
required task.
Definition: The physical component of the computer system is called hard ware.
e.g.: keyboard, mouse, monitor, printers, scanners, hard disk drives, floppy drives etc.

1.2. Computer Software: Software is the general term describing programs written by
the user, which makes it possible for individuals to use the computer. It is any prepared set of
instructions that controls the operations of the computer, which deals with the codes, coded
instructions according to which the computer operates.
Definition: A set of programs written to a computer is called software.
Software generally classified into two types 1. System software
2. Application software

1. System Software:
System software refers to all programs, which are responsible for maintaining and using
the system i.e. they are responsible for the working of the computer. The manufactures of the
system commonly supply system software.
Definition: System software (systems software) is computer software designed to operate
and control the computer hardware and to provide a platform for running application software. 
2. Application Software:
Application Software are often called productivity programs or end-user programs
because they enable the user to complete tasks such as creating documents, spreadsheets,
databases, and publications, doing online research, sending email, designing graphics, running
businesses, and even playing games.
Definition: Application software (an application) is a set of computer programs designed to
permit the user to perform a group of coordinated functions, tasks, or activities.
The most widely used general purpose application packages are EXCEL, WORD, ORACLE,
DTP packages and etc.
Computer languages:
A language is a means of communication between any two people. Similarly if we have
to communicate with the computer we need a language. Such a language is called as
programming language. With the help of programming language a user can tell the computer
what he wants it to do.
Definition: Programming language is a set of rules which a user has to follow to instruct the
computer what operations are to be performed.
Programming languages are classified into following categories:
 Machine level language
 Assembly level language
 High level languages
1. Machine level languages: The computer understands only 0’s
and 1’s. This language of the computer is called as the machine language or machine code. The
instruction provided by the machine language are directly understood by the computer and
converted into electrical signals to run the computer.
Definition: Machine language is the basic language of the computer, representing data as 1’s
and 0’s.

1
Advantages of Machine language:
1. Machine language makes efficient use of storage (instructions and their storage in
computer memory can be easily controlled).
2. Instructions of a machine language program are immediately executed. They require no
compilation or translation.
3. Machine language instructions can be used to manipulate the individual bits in a byte of
computer storage.
Disadvantages of Machine language:
1. Machine languages are machine dependent.
2. Machine language is difficult to program.
2.Assembly level languages:
The draw back of the machine language has lead to introduce of a new language called assembly
language. The language is substitute’s letters and symbols (mnemonics) for numbers in machine
program. Assembly language is also called as symbolic language. A program written in symbolic
language is called an assembly code or symbolic program.
Definition: Assembly language is a low-level programming language that allows a user to write
programs using letters and symbols which are more easily remembered.
e.g.
Statements Action
STA A Load the data to accumulator
ADD B Add the content of B to accumulator
STR C Store the result in location C
PRT C Print the results
HLT Stop
A computer can directly execute only machine language programs, which use numbers
representing instructions and storage locations. Hence, an assembly language program must be
converted into its equivalent machine language program, before it can be executed program. This
translation is done with the help of translator program, which is known as assembler.
Assembler: Assembler is system software, which translates an assembly language program into
its equivalent machine language program.
Advantages:
1. They are more standardized and easier to use than machine language
2. They operate very effectively and easier to use than machine language.
3. They are easier to debug because programs locate and identify syntax errors
Disadvantages:
1. Assembly language programs are usually very long.
2. Through less abstract than machine language, assembly language program are still complex
3. Through more standardized than machine language, assembly languages are still machine
independent.
3.High level languages:
To overcome the difficulties of low-level language such as machine dependency, difficult to
understand and so on new high level problem oriented languages were developed. Such
programming languages have an extensive vocabulary of words and symbols which is English
like and are used to instruct a computer to carry out the necessary procedures, regardless of the
type of machine being used.
Example: A typical program in high level language to add two numbers may like

2
However a program in high-level language has to be converted to its equivalent machine
language to be executed on a computer. The program that converts high-level language code into
machine code is called translator. The translates programs are two types namely compiler and
interpreters
High level languages are classified into two types. Namely,
1. General purpose language
2. Specific purpose language

General purpose language can be used to solve a wide variety of problems such as business
problems, scientific problems, and graphical applications and so on.

Example: BASIC, Pascal and C

Specific purpose languages can be used to solve only certain types of problems

Example: COBOL, FORTRAN.


Advantages of High-level languages:
1. Machine Independent: High-level languages are machine independent. This is a very
valuable advantage because it means that a company changing computers even to one
from a different manufacturer will not be required to rewrite all the programs that is
currently using.

2. Easy to learn and use: These languages are very similar to the languages normally used
by us in our day-to–day life. Hence they are easy to learn and use. The programmer need
not learn anything about the computer is going to use.

3. Fewer Errors and easier modification: In case of high level languages, since the
programmer need not to write the entire small steps carried out by the computer, he is
much less likely to make an error. Modifications to a program can be easily done with
little or no effort at all.

4. Better documentation: Higher level language is designed in such a way that its
instructions may be written more like the language of the problem.

5. High level programs may be used with different makes of computer with little
modification. Thus, reprogramming expenses are greatly reduced, when new machines
are acquired.
Translator:
ASSEBLER: is a language translator for low-level language. Assembler is a system program or
translator program that translates (converts) inputs source program written in Assembly language
into output object program that consist machine language binary code 0’s and 1’s.

Interpreter and complier


Interpreter and compliers are the language translator for high level languages. Although
interpreter and compiler are used for high-level language translations, they differ basically in
their operating mode.

INTEPRETER: An interpreter is a language translator (for system program) which translate


input high level language program line by line (or instruction by instruction) into equivalent
3
machine language instructions and immediately executes each instructions if they are free from
errors (if there no grammatical or semantic mistakes)

COMPILER: A compiler is a language translator which translate input high level language
source program into equivalent machine level language program (called object program) the
whole program is translated into equivalent machine level language if there are no syntax errors,
but there is no immediate execution of instruction by instruction as in case of interpreter.

Differentiate between a complier and interpreter.


Compiler Interpreter
It takes entire high-level language It takes one statement of a high level
program as input and translates it into language program as input and
1 1
machine language. translates it into machine language and
executes it.
All errors that occur in the program are Errors that occur only in the statement
2 listed and displayed 2 being taken for transaction are
displayed
3 Debugging is faster 3 Debugging is slower
4 Require more memory 4 Require less memory
5 Costlier 5 Cheaper
6 Security of source code 6 No security of source code

Program Development Cycle

Problem solving by a computer is not a simple job, but it is a creative process which largely
defines the systematization and mechanization. Problem solving is also a challenging, exciting
and satisfying experience. It is necessary to know the problem solving techniques to solve a
particular problem using computer.
Problem solving by the computer involves the following steps.
 Problem definition
 Analysis
 Design (Algorithm and Flowcharts)
 Coding
 Debugging
 Testing
 Documentation
1. Problem Definition
This is the first step in computer problem solving. The problem solver should understand the
problem thoroughly interms of the requirements. That is, what is the input and output operations
to be performed.

4
2. Analysis
The given problem must be analyzed before it is solved. This determines the data items,
their types and relationship. We should specify the operations (Arithmetic and logical) to be
performed on them and checking the suitability in terms of memory and execution time.
3. Design the Program
This stage often uses one of two ways to describe the solution:
1. Algorithm
2. Flow Chart
4. Code the program.
Translate the logic from the flow chart/Algorithm into a programming language.
5. Debugging
If any bugs are detected, return to the coding phase to eliminate them or correct errors
from program.
6. Test the program.
Check whether the program gives desired results. Run a number of test cases through
the program to demonstrate that it works.
7. Document the program.
This is the time for a formal document called the user manual to be produced.
Algorithm
It is a problem solving technique. It can be defined as a step by step procedure to solve a
particular problem. It consists of English like statements. Each statement must be precise and
well-defined to perform a specific operation.
Example 1. Algorithm to compute the Sum of two numbers.
Algorithm : Sum of two numbers.
[Read the values of A and B]
Step 1 : Read A, B
Step 2 : [Compute the Sum]
Sum = A + B
Step 3 : [Print the Contents of the Sum ]
Print Sum
Step 4 : [End of the Algorithm]
Stop

5
Example 2. Algorithm to compute the area of circle
Algorithm : Area of Circle
Step 1 : Read Radius
Step 2 : [Compute the area ]
Area = 1 3.142 * Radius * Radius
Step 3 : [Print the Area ]
Print Area
Step 4 : [End of the Algorithm ]
Stop
3.2 Flowcharts A Flowcharts is a pictorial or graphical representation of solution to
any problem. Flowcharts are constructed by using special geometrical symbols. Each
symbol represents an activity.

6
Example 1. Design a flowchart and an algorithm to find the area of a circle

START

INPUT
Radius

Area 3.142 * Radius * Radius

OUTPUT
Area

STOP

Example 2: Design a flowchart to find the sum of two numbers.

START

INPUT
A,B

Sum A+B

OUTPUT
Sum

STOP

You might also like