Unit 2 Part 1
Unit 2 Part 1
Unit – 2
Interaction with
computers
(BCA – 105)
S.P. Chauhan 1
Computer Software
As discussed earlier computer system consists of 4 elements.
a. Hardware
b. Software
c. User
d. Data
Hardware:-
It represents the physical and tangible components of the computer i.e. the component that
can be see and touched. Eg : Input devices, output devices, CPU, secondary storage devices
like floppy, HDD etc.
Software:-
As computer cannot do anything on its own i.e. it does not have its own intelligence. So we
need to give the instruction to solve a particular problem. Such a set of instructions written
in a language which is understood by a computer controls the sequence of operations, is
called computer program and collectively these programs are called software.
i.e. Software is the set of programs that govern the operation of a computer system and make
the h/w run where as a program is a sequence of instructions written to solve a particular
problem. Basically software is responsible for controlling, integrating and managing the
hardware components of a computer system and to accomplish specific tasks. S.P. Chauhan 2
Computer Software
Software:-
So software relates to a set of programs, that control the computer hardware and make them
operational i.e. governs the operations of a computer system. It act as an interface between
the user and the hardware. It helps the user to interact with the particular hardware
component.
Eg : A college automation s/w .(program to input the details of student, a program to
calculate the fees from these details, a program to calculate fine for the students, program to
manage the results of the student, count the lecture of students in different subjects).
Software can be classified in two broad categories:
Software
S.P. Chauhan 4
Computer Software
System Software:-
System control program:-
They control the execution of programs, manage the storage and processing resources of
the computer and perform other management and monitoring functions.
i.e. These programs support the execution of other application software and monitor
effective use of various hardware resources such as CPU, memory & other peripheral
devices etc. E.g. OS
System support program:-
These programs are also called utility or service program and perform day to day tasks
related to the maintenance of the computer system. They are used to support, enhance,
expand and secure existing programs and data in the computer system. Some of them are
provided with the OS, some are free and some need to be purchased.
Some popular utility programs are :-
File manager, Backup utilities, Data recovery software, Compression utilities, Antivirus
utility, Disk defragmenter etc
S.P. Chauhan 5
Computer Software
System Software:-
System development program:-
They assist in the creation of application programs. i.e. support the development of other
application software.
E.g : Language translators like interpreters, compilers and assemblers, linkers and loaders
i.e. These programs support the execution of other application software and monitor
effective use of various hardware resources such as CPU, memory & other peripheral
devices etc. E.g. OS
System driver program:-
They communicate with and controls operation of peripheral devices such as printers etc.
Features System Software:-
a. Close to the System
b. Fast in speed
c. Machine Dependent
d. Difficult to manipulate
e. Smaller in size
f. Difficult to design S.P. Chauhan 6
Computer Software
Application Software:-
Application s/w is a set of one or more programs which solve a specific problems or a
specific task rather then just managing a computer system. Application Software acts as a
mediator between the end-user and System Software.
The set of programs included in the application software packages are called application
program and the programmers who prepare the application software are called application
software programmer.
i. General Purpose:-
These s/w are designed to satisfy common needs of various business. These application
s/w are developed by leading companies and sold as a product in the market. Some general
purpose application s/w are :
Word-processing software:- word processor is the s/w dealing with documents like
creating, modifying, viewing, storing, retrieving, and printing documents. It can be used
to print letters, reports, booklets etc. in a suitable layout.
Spreadsheet software:- Spreadsheet software is a numeric data-analysis tool that allows
you to create a computerized ledger.
S.P. Chauhan 7
Computer Software
Application Software:-
i. General Purpose:-
Presentation s/w:- are the application s/w which are used to present information to a
large no of peoples.
Database management system:- A database software is a collection of related programs
that helps to create, maintain and retrieved data according to user demand.
Accounting programs:- they generate financial reports, produce invoices and statements
of customers, handles accounts payable and receivable, print payroll checks and payroll
reports. Eg : Tally.
ii. Special Purpose:-
These s/w are created to satisfy specific needs of an organization. Eg : payroll s/w,
inventory control s/w, railway reservation s/w etc.
Features of Application Software:-
• It is close to user
• Slow in speed
• It is written in HLL.
• Easy to understand
• Easy to manipulate and use.
• Bigger in size and requires large storage spaces
S.P. Chauhan 8
Computer Software
Difference between Application Software & System software:-
Application S/w System S/w
User oriented System oriented
Slow in speed Fast in speed
More interactive Less interactive
Easy to understand Difficult to understand
Easy to manipulate Difficult to manipulate
Written in HLL Written in low level language
It is easy to design Difficult to design
Bigger in size Smaller in size
Eg : payroll, library system, railway Eg: OS, compiler, assembler and interpreter
reservation system
S.P. Chauhan 9
Computer Language
To communicate with each other we need some medium which we called language i.e.
language is a means of communication and every language have meaningful symbols, syntax &
rules called grammar.
We use natural languages such as English, Hindi etc to communicate with each other, but
computers are machines and unfortunately computers cannot understand these natural
languages. So some special language are required to give instructions to the computer.
Language required to give instructions to the computer called a computer language or
computer programming language. A programming language consists of symbols characters,
syntax and rules that permit the user to communicate with the computer.
However computer being a machine, it can not perform its own and needs to be instructed to
perform even a simple task and the process of writing such instructions in any computer
programming language is called programming or coding. Set of such instructions is called
computer program, which clearly specify the ways to carry out a particular task by computer.
Computer languages may be basically classified into following categories:
a. First generation: Machine Language
b. Second Generation: Assembly Language
c. Third Generation: High Level Language
d. Fourth Generation: 4GL S.P. Chauhan 10
Computer Language
a. First generation: Machine Language:-
It is the set of instructions codes which can be directly understood by the CPU of computer
without the help of translating program it is also called machine code. As computers are
digital devices that have only two states ON & OFF (1’s & 0’s). So machine language
programs are coded as a string of binary digits (1’s & 0’s). Machine language is the
fundamental or native language of computer.
An instruction written in machine language has two parts:
i. Operation code :-
It is also called command or OP Code, it tells the computer what function to perform.
Every computer has an operation or OP code for each of its function to perform. i.e. the
operation code denote the operation which is to be performed like addition,
multiplication, division, subtraction etc
ii. Operand:-
It tells the computer where to find or store the data or other instructions that are to be
manipulated i.e. the operand of the instruction code gives the specific location or
address of the data to which the operation is to be applied
Thus each instruction tells the control unit of CPU what to do and the length and location of
the data fields that are involved in the operation. S.P. Chauhan 11
Computer Language
a. First generation: Machine Language:-
A typical instruction in the machine language may be 01100111 10110011 11000101
Thus machine language is very difficult to write, read and understand for a human.
Advantage:-
The only advantage of machine language is that program written in machine language run
very fast because no translation of program is required, as CPU can directly understand
machine instructions
Disadvantages:-
i. Machine Dependent:-
It is very difficult to write a program in machine language. Because programmer has to
know details of hardware before writing any program.
ii. Difficult to Program:-
The programmer has to remember a lot of codes to write a program which results in
program errors.
iii. Time Consuming
iv. Difficult to modify the program.
S.P. Chauhan 12
Computer Language
b. Second Generation: Assembly Language:-
This language was developed in early 1950 and its main developer was IBM. It allow the
programmer to interact directly with the hardware and assign mnemonic code to each
machine language instructions to make it easier to remember or to write.
Mnemonics are the alphanumeric codes (Usually three letter long) corresponding to each
machine language instruction in the instruction set. Eg. ADD instead of 1110 in binary OR
14 in decimal for the instruction addition, SUB instead of 1111 in binary OR 15 in decimal
for the instruction to subtract and so on.
So the language which substitute letters and symbols called mnemonics for both arithmetic
and logical operations OR for the numbers in the machine language program is called
Assembly language OR Symbolic Language.
A program written in symbolic language that uses symbols instead of numbers is called
Assembly code or a Symbolic program.
As we know a computer can understand the machine language only and no other language.
Hence we have to convert assembly language programs into machine language programs. For
this, translation process is carried out by the computer itself by means of software called
assembler. Basically assembler is a system program supplied by the computer manufacturer.
It is so called because it also assemble the machine code in main memory of the computer
S.P. Chauhan 13
Computer Language
b. Second Generation: Assembly Language:-
The program written in the assembly language is known as the source program whereas the
translated program in machine language by assembler is termed as object program.
The basic unit of assembly language program is a line of code. It allow the use of symbols
and set of rules that can be used and combined to form a line of code. Each line of assembly
language program consists of four columns called fields and general format of assembly
language instruction is as follows:
[label] <opcode><operands>[;comment]
Brackets […] indicate that enclosed specification may or may not appear in the statement.
LABEL:-
Label field represents the symbolic address of an instructions. A label may consists of one to
six alphanumeric characters (A to Z or 0 to 9) with no space b/w the character and must begin
with an alphabet. The jump instructions such as JPU causes the control to jump to some other
part of the program skipping an instruction or a set of instructions.
OPERATION CODE (opcode):-
It is an mnemonic instruction such as ADD, MUL, DIV, SUB etc.
S.P. Chauhan 14
Computer Language
b. Second Generation: Assembly Language:-
OPERAND :-
Operand consists of symbolic address of a memory location. Operand fields consists of
alphanumeric characters. Eg. A, B, C, AL etc. if multiple operands are used, each of them is
separated by coma.
COMMENTS:-
The text after semicolon (;) is just comments. Comments are not a part of actual program.
They are used to specify what actually the statement will do. So Comments are optional. Eg
Label opcode operands comments
BEGIN ADD X, Y ; Add y to x
Assembler ML/Object
AL /Source Program Program
S.P. Chauhan 15
Computer Language
b. Second Generation: Assembly Language:-
Advantages of Assembly Language :-
i. Easy to understand and use:-
Operation code used in machine language can be replaced by mnemonics which are
easier to remember and use.
ii. Less error:-
It is not required to keep the track of memory location. The memory locations are
replaced by variable names. Hence chance of error much reduced.
iii. Easy to modify:-
The insertion and deletion in the program are quite easy.
iv. Easy to program:-
The human effort required to write a program is much less as compared to ML.
v. Efficiency:-
AL program can run much faster and use less memory and other resources than a similar
program written in HLL.
S.P. Chauhan 16