This document provides an introduction to different types of software and programming languages. It discusses system software and application software. It also covers different generations of programming languages from machine language (1GL) to high-level languages (3GL), non-procedural languages (4GL), and natural languages (5GL). Key points include the evolution of programming languages to be more readable and portable, the translation of high-level languages into machine code, and the goal of 4GL and 5GL to reduce programming effort.
2. LEARNING OBJECTIVES
Introduction to Software
2
▰ Identify system programs and application programs
▰ discuss basic concepts of high- and low-level languages
3. SOFTWARE
written programs, procedures or rules and associated
documentation pertaining to the operation of a computer system
and that are stored in read/write memory
3
6. SOFTWARE
2. Local Application Software
its files are placed in the appropriate locations on the computer’s hard
disk and may require additional configurations with the underlying
operating system so that it can be run as and when required.
6
7. SOFTWARE
3. Portable Software
is basically designed to run from removable storage, such as a CD or
USB flash drive without installing its program files or configuration
data on the hard disk.
7
8. SOFTWARE
4. Web Application Software
is accessed through a Web browser and most of its program code runs on
a remote computer connected to the Internet or other computer network.
8
10. “ It is composed of a set of
instructions in a language
understandable to the programmer
and recognizable by a computer.
10
10
Programming Languages
11. Programming Languages 11
Computer languages have been
continuing to grow and evolve since
the 1940’s.
Most programming languages are
designed to be good for one
category of applications but not
necessarily for the other.
The development of programming
languages has been governed by a
number of factors such as type and
performance of available hardware,
applications of computers in
different fields, the development of
new programming methodologies
and its implementation etc.
12. GENERATION OF PROGRAMMING LANGUAGES
▰ First generation language (1GL)—machine language
12
The instructions in machine language are written in the form of binary
codes that can immediately be executed by the processor.
A machine language instruction generally has three parts:
General format of machine language instruction
13. GENERATION OF PROGRAMMING LANGUAGES
▰ First generation language (1GL)—machine language
13
Machine language is considered to be the first generation (1GL). As it is the
native language of the computer, CPU can directly start executing machine
language instructions. But the limitations of using machine language in
writing programs include the following:
DIFFICULT TO USE AND ERROR PRONE. It is difficult to understand and develop a
program using machine language because it is hard to understand and remember the various
combinations of 1’s and 0’s representing data and instructions.
MACHINE INDEPENDENT. As the internal design of the computer is different across
types, which in turn is determined by the actual design or construction of the ALU, CU, and size of
the word of the memory unit, the machine language also varies from one type of computer to
another.
14. GENERATION OF PROGRAMMING LANGUAGES
▰ Second generation language (2GL)—assembly language
14
Assembly language is considered to be a second generation language
(2GL). In this language, an instruction is expressed using mnemonic codes
instead of binary codes. Normally an assembly language statement
consists of a label, an operation code, and one or more operands.
LABELS. Are used to identify and reference instructions in the program.
OPERATION CODE. Is a symbolic notation that specifies the particular operation to be
performed, such as MOV, ADD, SUB, or CMP etc.
OPERAND. Represents the register or the location in main memory where the data to be
processed is located.
15. GENERATION OF PROGRAMMING LANGUAGES
▰ Second generation language (2GL)—assembly language
15
Writing a program in assembly language is more convenient than writing in
machine language. Instead of binary sequence, as in machine language, a
program in assembly language is written in the form of symbolic instructions.
This gives the assembly language program improved readability. It also offers
several disadvantages.
• The most eminent disadvantage of assembly language is that it is machine dependent.
Assembly language is specific to the internal architecture of a particular model of a processor
and the programmer should know all about the internal architecture of the processor. A
program written in assembly language for one processor will not work on a different
processor if it is architecturally different.
16. GENERATION OF PROGRAMMING LANGUAGES
▰ Second generation language (2GL)—assembly language
16
Writing a program in assembly language is more convenient than writing in
machine language. Instead of binary sequence, as in machine language, a
program in assembly language is written in the form of symbolic instructions.
This gives the assembly language program improved readability. It also offers
several disadvantages.
• Though mnemonic codes are easier to be remembered than binary codes, programming with
assembly language is still difficult and time-consuming.
17. GENERATION OF PROGRAMMING LANGUAGES
▰ Third generation language (3GL)—high-level language
17
High-level languages are called third generation languages (3GLs). High-
level programming languages were developed to make programming easier
and less error-prone. Languages like C, C++, COBOL, FORTRAN, BASIC,
PASCAL etc., have instructions that are similar to English language that
makes it easy for a programmer to write programs and identify and correct
errors in them.
10 LET X = 7
20 LET Y = 10
30 SUM = X + Y
40 PRINT SUM
50 END
* Program written in BASIC to obtain the sum of two numbers.
18. GENERATION OF PROGRAMMING LANGUAGES
▰ Third generation language (3GL)—high-level language
18
Most third generation languages are procedural in nature. That is, the
programmer must specify the sequential logically related steps to be
followed by the computer in a program.
As computer only understands machine language, a program written in a
high level language must be translated into the basic machine language
instruction set before it can be executed. This can be performed either by a
compiler, or by interpreter.
One statement in a high-level programming language will be translated into
several machine language instructions.
19. GENERATION OF PROGRAMMING LANGUAGES
▰ Third generation language (3GL)—high-level language
19
Advantages of high-level programming languages are many fold which are
as follows.
READABILITY. Programs written in these languages are more readable than those written in
assembly and machine languages.
PORTABILITY. High-level programming languages can be run on different machines with
little or no change.
EASY DEBUGGING. Errors can be easily detected and removed.
EASE IN THE DEVELOPMENT OF SOFTWARE. Since the instructions or statements of
these programming languages are closer to the English language, software can be developed
with ease.
20. GENERATION OF PROGRAMMING LANGUAGES
▰ Fourth generation language (4GL)—non-procedural
language
20
The Fourth Generation Language (4GL) is a non-procedural language that
allows the user to simply specify what is wanted without describing the
steps that the computer has to follow to produce the result.
This class of languages requires significantly fewer instructions to
accomplish a particular task than does a third generation language. Thus, a
programmer should be able to write a program faster in 4GL than in a third
generation language.
21. GENERATION OF PROGRAMMING LANGUAGES
▰ Fourth generation language (4GL)—non-procedural
language
21
The main areas and purviews of 4GLs are: database queries, report
generators, data manipulation, analysis and reporting, screen painters, etc.
An example of a 4GL is the query language that allows a user to request
information from a database with precisely worded English-like sentences.
A query language is used as a database user interface and hides the specific
details of the database from the user.
22. GENERATION OF PROGRAMMING LANGUAGES
▰ Fourth generation language (4GL)—non-procedural
language
22
The following example shows a query in a common query language, SQL.
SELECT address FROM EMP WHERE empname = ‘PRADIP DEY’
With a report generator, the programmer specifies the headings, detailed
data, and other details to produce the required report using data from a file.
23. GENERATION OF PROGRAMMING LANGUAGES
▰ Fourth generation language (4GL)—non-procedural
language
23
4GLs offer several advantages which include the following.
▰ Like third generation languages, fourth generation languages are mostly machine
independent. They are primarily used mainly for developing business applications.
▰ Most of the fourth generation languages can be easily learnt and employed by end-users.
▰ All 4GLs are designed to reduce programming effort, the time it takes to develop software,
and the cost of software development. Programming productivity is increased when 4GL is
used in coding.
24. GENERATION OF PROGRAMMING LANGUAGES
▰ Fifth generation language (5GL)—natural languages
24
Natural languages represent the next step in the development of
programming languages belonging to Fifth Generation Language (5GL).
Natural language is similar to query language, with one difference: it
eliminates the need for the user or programmer to learn a specific
vocabulary, grammar, or syntax.
25. GENERATION OF PROGRAMMING LANGUAGES
▰ Fifth generation language (5GL)—natural languages
25
Actually, 5GL is a programming language based around solving problems
using constraints given to the program, rather than using an algorithm
written by a programmer.
OPS5 and Mercury are examples of fifth generation languages.
Fifth generation languages are used mainly in artificial intelligence
research.