You are on page 1of 9

Chapter 6 systems software is generally provided by the

manufacturer of the computer hardware.


Computer Software, Programming Without the systems software the hardware
Languages and Program Development would not work.

As is already seen, a computer cannot do Utility Software:


anything on its own. It has to be provided a These are a set of programs or tools which are
detailed set of instructions to perform a specific used in program development or for performing
task to achieve a desired goal, this set of limited tasks, eg. scandisk.
instructions, which are written in the form
which is understood by the computer, is known Computer Viruses*
as a computer program. The program controls Viruses: A virus is a small piece of software that
the processing of the computer. piggybacks on real programs. For example, a
Software is mainly classified into: virus might attach itself to a program such as a
spreadsheet program. Each time the
• Application Software spreadsheet program runs, the virus runs, too,
and it has the chance to reproduce (by attaching
• System Software to other programs) or wreak havoc.
• Malware E-mail viruses: An e-mail virus travels as an
Application Software: attachment to e-mail messages, and usually
replicates itself by automatically mailing itself to
Application software is a program or a set of dozens of people in the victim's e-mail address
programs which are written to carry out a book. Some e-mail viruses don't even require a
specific application.eg. Payroll, financial double-click -- they launch when you view the
accounting etc. Nowadays special application infected message in the preview pane of your e-
software or packages for specialized areas like mail software [source: Johnson].
drawing, engineering, manufacturing, banking,
and publishing are available. The set of Trojan horses: A Trojan horse is simply a
programs which together make an application computer program. The program claims to do
package are called application programs. one thing (it may claim to be a game) but
instead does damage when you run it (it may
System Software: erase your hard disk). Trojan horses have no
way to replicate automatically.
The systems software controls the working of
the computer system. It helps the user to use Worms: A worm is a small piece of software
the computer by allowing him to communicate that uses computer networks and security holes
with the system. System software controls the to replicate itself. A copy of the worm scans the
working of other software’s, hardware, network for another machine that has a specific
hardware devices like printers, memory, CPU security hole. It copies itself to the new machine
etc. Thus, they make the operation of the using the security hole, and then starts
computer more efficient. The programs replicating from there, as well.
included in system software are systems
programs. Without the systems programs, it What are some tips to avoid viruses and
would not be possible for the application lessen their impact?
programs to work on the computer. The
• Install anti-virus software from a reputable is understood by both man and machine. There
vendor. Update it and use it regularly. are a number of programming languages.
However, all these languages are designed to
• In addition to scanning for viruses on a regular
perform at least certain basic instructions and
basis, install an "on access" scanner (included in
operations; These instructions and operations
most anti-virus software packages) and
are:
configure it to start each time you start up your
computer. This will protect your system by  Input/output operations,
checking for viruses each time you run an  Arithmetic operations - mathematical
executable file. operations like addition, subtraction, -
Logical operations - Comparison for
• Use a virus scan before you open any new
equality, inequality etc.
programs or files that may contain executable
 Movement of instructions and data to
code. This includes packaged software that you
and from the CPU.
buy from the store as well as any program you
might download from the Internet. To use the programming language, the
programmer has to strictly follow the rules of
• If you are a member of an online community
the language including all commas, punctuation
or chat room, be very careful about accepting
marks etc. otherwise the program will not be
files or clicking links that you find or that people
understood by the computer. Thus, although
send you within the community.
the programming languages are much smaller
Make sure you back up your data (documents, and simpler than the natural languages, they
bookmark files, important email messages, etc.) have to be used with the greatest accuracy.
on disc so that in the event of a virus infection,
you do not
Types of programming languages
a) Machine Language
Firmware: b) Assembly Language
With the advances in technology it is now c) High Level Language
possible to make the software available on ROM
(Read Only Memory) chips. These chips, which
form a part of the software, have the programs
in them.

Thus programs available on hardware are called


Firmware. Today not only systems software, but
even some dedicated application programs are
being made available on firmware.

PROGRAMMING LANGUAGES
A programming language is a means of
communication for the user to communicate
with the computer system. The programming
language is a set of instructions which tells the
computer what to do. This is a language which
a) Machine Language: language. They can be also modified relatively
easily. However, like the machine language,
This is the only language which is understood by
assembly languages are also hardware
the computer. This is the language nearest to
dependent. When the machine changes, the
the
program has to be changed.
machine. In this language the programs are
Since the machine language and assembly
written in binary code i.e. the instructions are
language both are dependent on the hardware,
made only by a combination of binary digits 0
they are referred to as low level programming
and 1. Machine language may vary from
languages. Both these languages require a deep
machine to machine depending upon the
understanding of the internal structure of the
computer architecture. Machine languages
computer.
execute the fastest since they are immediately
understood by the computer. No translation of 1. High Level Languages:
the programs is required. Also they make
Higher level languages make use of English like
efficient use of primary memory. But it is very
words and statements and mathematical
difficult to program in this binary or machine
symbols for instructions. Higher level languages
language. It is also very tedious and time
make programming easier, since they are
consuming, since all the instructions have to
relatively easy to learn. Less time is required to
represent as a series of O’s and 1’s. Therefore,
write programs in high level languages. The
there is always a possibility of errors.
programmer is not required to know the
b) Assembly Language: detailed working of the computer system in
order to program in a high level language. They
The O’s and 1’s of the machine language were
are machine independent. Higher level
substituted by letters and symbols in assembly
languages are also known as problem oriented
languages. The assembly languages use
languages. However, a high level language is not
mnemonics (memory aid) in place of operation
directly understood by the computer. It is
codes. The language uses symbols instead of
required to be translated into machine
numbers to write programs. A program written
language. Therefore, they generally execute
using such symbols in the assembly language is
more slowly and require more memory than the
called the source program. The program written
same program written in assembly language.
in assembly language has to be converted into
machine language for use by the computer. This The programs which are used to translate
is achieved with the help of the assembler. The programs written in high level language into
assembler is a system program which is machine language are known as translators.
supplied by the manufacturer. It converts the
The types of translators are:
assembly program into a machine readable
program and the resulting program is called the I) Compiler
object program. Thus the input to the
assembler is the source program and the output II)Interpreter
of the assembler is the object program. The I) Compiler:
assembler translates each assembly language
instruction into a corresponding machine code. The compiler translates the entire source
program into machine language program at
It is relatively easy to write programs in once. The source code remains intact. Once a
assembly language as compared to machine
program is compiled it can be run as many can be understood by the computer. These
times as required, without being required to be translators are also known as language
recompiled. A compiler can translate only those processors.
programs which have been written in the
c) Fourth Generation Languages (4 GL):
language for which it is designed. Also each
machine has to have its own compiler. Programming languages are sometimes
classified with generations - from the lowest to
A compiler is a program which normally resides
the highest.
on the secondary storage device. It gets loaded
into the CPU when the source program is to be The First Generation - Machine Language
translated. A compiler checks for errors like
illegal symbols, statements etc. during The Second Generation - Assembly Language
compilation and gives out a list of error The Third Generation - High4.evel Language
messages at the end of execution. This is a very
valuable aid to the programmer to correct the Unlike procedural languages which require that
programs. However, the compiler is incapable a programmer writes all the steps to complete
of detecting any logical errors in the program. the program and generate output, which are
related to a more structural approach towards
II) Interpreter: programming. It is the first standardized
The interpreter is the program which translates language.
a high-level language program into machine • BASIC:
language as follows:
BASIC stands for Beginners All Purpose Symbolic
- it takes one statement from the high level Instruction Code. The language was developed
language program by Prof. John Kemeny and Thomas Kurtz in USA.
- translates it into a machine instruction and the It irrelatively easy to learn. Programs written in
instruction is immediately executed. Since the BASIC language are interpreted. It resembles
program is translated statement by statement, FORTRAN in many ways, but can also be
the machine level program of the source effectively used in business applications. Thus it
program is not stored anywhere in memory. can be used for both business and scientific
applications. BASIC is one of one most popular
Therefore, the program has to be interpreted language for use in microcomputer systems.
every time when it has to be run. Thus no object
code is generated. The interpreted programs • COBOL:
are generally slower than compiled programs. Common Business Oriented Language was
However, if any changes are made in the source designed especially for business applications. A
program it can interpret only those statements
and it is not required to compile the entire COBOL program is constructed from sentences,
program again. Interpreters are relatively easy paragraphs, sections and divisions. A COBOL
to write and smaller in size as compared to program must have four divisions: the
compilers. identification division, the environment division,
data division, and the procedure division. Thus,
Thus assemblers, compilers and interpreters are COBOL is a self-documenting language. It is one
systems software which translate the source of the most widely used commercial languages.
program into object program i.e. program which
• RPG:

Report Generator is a general purpose, business


oriented language designed to generate output
reports. The language was developed by IBM
PROGRAM DEVELOPMENT PROCESS
and was launched for use on the IBM 1401 While writing a computer program, it is
computer. It is best suited for applications absolutely necessary to write each and every
where large data files have to be read and instruction in the correct sequence. The logical
extensive reports are to be output. It has control of element within the computer
limited mathematical capability and is not program is the most important aspect of
suited for scientific applications. programming.
• PASCAL: The various stages in the development of a
PASCAL has been named after the French computer program are:
mathematician Blaise Pascal; It allows the • Problem Definition
programmer to structure the programming
language. The features of PASCAL allow it to be • Program Design
used for both scientific and business • Coding
applications. It is a very powerful language. It is
implemented on several computers including • Debugging
microcomputers and minicomputers and is also
• Testing
widely used to teach programming to students
and beginners. • Documentation

• C: • Maintenance

C was designed and developed at Bell Problem Definition:


Laboratories USA. It is a block structured
The first step in the process of program
language which allows the use of various
development is the thorough understanding
concepts of structured programming. C also has
and identification of the problem for which is
the advantage of being able to manipulate
the program or software is to be developed. In
internal processor registers of the computer.
this step the problem has to be defined
Thus it has some powers of the assembly
formally. All the factors like Input/output,
language. C is also very portable. C is the most
processing requirement, memory requirements,
popular language used for systems
error handling, interfacing with other programs
programming like designing compilers and
have to be taken into consideration in this
operating systems.
stage.
LISP:
Program Design:
LISP stands for list processing. This language is
The next stage is the program design. The
mostly used in non-numeric applications which
software developer makes use of tools like
require widely used in games, pattern
algorithms and flowcharts to develop the design
recognition and artificial intelligence.
of the program.

• Algorithm:
An algorithm represents the logic of the The symbol denotes the beginning, ending and
processing to be performed. It is a sequence of halt operation in the program logic. Thus, it is
instructions which are designed in such a way the first and the last Symbols! in any nov-chart
that if they are executed in the specified to indicate the start and stop of the process.
sequence, the desired goal is achieved. It is
imperative that the result be obtained after
execution of a finite number of steps. Input/output:
In an algorithm, Indicates when an input or output operation is
to performed in the process.
- Each and every instruction has to be precise
and clear. Processing:
- The instruction has to be executed in a finite This represents the arithmetic operations like
time. addition, subtraction etc, and the movement of
- When the algorithm terminates the desired data in the process
result should be achieved.
Decision:
Flowchart:
The decision symbol is used to represent a point
A flowchart is a pictorial representation of the where one or more alternatives is possible. The
algorithm. It represents the steps involved in criteria for decision making are written in the
the procedure and shows the logical sequence decision box. On each path the condition for
of processing using boxes of different shapes. which the particular path is to be followed has
The instruction to be executed is mentioned in to be written. During the execution the
the boxes. These boxes are connected together appropriate path will be followed depending
by solid lines with arrows, which indicate the upon the result of the decision.
flow of operation.
Flow lines:
The first step in the design of a program is the
algorithm. The algorithm is then represented in These indicate the flow of operation ie. The
the form of a flowchart and the flowchart is sequence of instruction execution. Flow lines
then expressed in the computer language to are normally drawn with arrowhead indicating
actually prepare the computer program. the direction of flow of the program.

Connectors:

A connector is used to indicate the logic flow


from one page to another when the flowchart
becomes very long. Connectors do not
represent any operation. They are mainly used
in the flowchart for clarity and convenience.
The symbols used in the flowchart are: Types of logic used in the flowchart:

Sequential Execution: In this logic the


Terminal (Start/Stop): instructions are executed one after the other
sequentially.
Transfer of control: This is a logic which is used
when the option to be chosen depends upon
the result of the decision. The control is
transferred to a particular path if the result of
the decision branches to that path.

Looping: In looping or repetitive logic, an


instruction or a number of instructions are
executed more than once. The instructions are
executed till the decision criteria is true. The
decision criteria can be placed before the loop
or after the loop depending upon the
statements which are to be executed in the
loop.

Let us see some examples of writing algorithms


and flowcharts.
(2) Write an algorithm and flowchart to read
(1) Write an algorithm and develop a flowchart
two numbers A and B and compare them. If A
to convert the temperature input in Celsius
is greater than B print, A is greater than B else
scale to Fahrenheit scale.
print B is greater than A. Algorithm:
Solution:
Step 1: Start.
First write a detailed stepwise algorithm to do
Step 2: Input values of A and B. Step 3:
the conversion
Compare values of A and B (Is A > B?).
Step 1: Start.
Step 4: If yes then print “A is greater than B”.
Step 2: Input temperature in Celsius (C).
Step 5: If no, the print “B is greater than A”.
Step 3: Convert to Fahrenheit (F) using the
Now draw the flowchart for the above.
formula F = 9/5 * C + 32.

Step 4: Print the temperature in Fahrenheit (F).

Step 5: Stop.

Next on the basis of this step wise algorithm


develop the flowchart using the appropriate
flowchart symbols as follows:
Other techniques which can be useful in • Un initialization of variables,
designing of the program are:
• Reversing of order of operands,
Modular Programming:
• Confusion of numbers and characters,
Using this method, the entire program is
• Inverting of conditions eg jumping on zero
divided into smaller manageable modules so
instead of on not zero.
that the smaller modules can be designed,
coded and debugged separately. The tools or methods which can be used to
debug the programs include:
Top-Down Design:
• Simulator - This is a computer program which
Here the overall problem is first defined in
simulates the execution of the program on
terms of general subtask. These subtasks are
another computer.
divided into further sub tasks.
• Logic Analyzers: This test instrument detects
the states of digital signals during each clock
Coding: cycle and stores them in memory. It then
displays this data on the monitor.
Once the design process is complete, the actual
computer program is written, i.e. the • Breakpoints: This is introduced in the
instructions are written in a computer language. program to halt the execution at some
Coding is generally a very small part of the intermediate point. At this point, the values of
entire program development process and also a the various inputs, outputs, variables etc. can
less time consuming activity in reality. In this be checked.
process all the syntax errors i.e. errors related
• Software interrupts: This is an instruction
to spelling, missing commas, undefined labels
which saves the current value of the program
etc. are eliminated. For effective coding some of
counter and then branches to a specific
the guidelines which are applied are:
memory location. At this location there is the
• Use of meaningful names and labels of debugging program which displays the status
variables, information.

• Simple and clear expressions, • Memory dump: This gives a listing of the
current contents of a section of the memory.
• Modularity with emphasis on making
Memory dumps are common in most simulator
modules generalized, making use of comments
programs, and microcomputer systems.
and indenting the code properly, avoiding
jumps in the program to transfer control. • Trace routine: This program prints the current
of the processor at specified intervals.
Debugging:
Testing (Validation):
At this stage the errors in the programs are
detected and corrected. This stage of program The program is tested on a number of suitable
development is an important process. test cases. A test plan of the program has to be
Debugging is also known as program validation. done at the stage of the program design itself.
This ensures a thorough understanding of the
Some common errors which might occur in the
specifications. The most trivial and the most
programs include:
special cases should be identified and tested. It
is always useful to include the maximum and
minimum values of all variables as test data.

Documentation:

Documentation is a very essential step in the


program development. Documentation help$
the users and the people who maintain the
software. This ensures that future modification
if required can be done easily. Also it is required
during redesigning and maintenance.

Maintenance:

Updating and correction of the program for


changed conditions and field experience is
accounted for in maintenance.

Maintenance becomes essential in following


situations:

- Change in specification,

- Change in equipment,

- Errors which are found during the actual


execution of the program. Modularity,
structured programming, thorough testing and
debugging and proper documentation greatly
reduce the time and cost of maintenance of the
software.

You might also like