Explaining Computer Languages
Computer Languages
Language is actually a
vocabulary and set of grammatical rules for constructing a computer program to
perform a specific task.
The term programming language
usually constitutes several set of instructions to perform a specific task. A
program is written as a series of human understandable computer instructions
that can be read by compiler and linker, and translated into machine code so
that a computer can understand and run it.
Thus we can say that a
programming language is a computer language, programmers used these languages
to develop applications, script or other set of instruction for a computer to
execute.
Machine and assembly
languages are low-level, requiring a programmer to manage explicitly all of a
computer's idiosyncratic features of data storage and operation. In contrast
high-level languages shield a programmer from worrying about such
considerations and provide a notation that in more easily written and read by
programmers.
There are basically two types of
computer programming languages given below:
1. Low level language
2. High level language
1. Low Level
Languages
The programming languages that are very close to machine
code (0s and 1s) are called low-level programming languages.
The program instructions written in these languages
are in binary form.
The examples of low-level languages are:
- machine
language
- assembly
language
Machine Language
The instructions in binary form, which can be
directly understood by the computer (CPU) without translating them, is called a
machine language or machine code.
Machine language is also known as first generation
of programming language. Machine language is the fundamental language of the
computer and the program instructions in this language is in the binary form
(that is 0's and 1's).
This language is different
for different computers.
It is not easy to learn the
machine language.
Advantage of Machine Language
The only advantage of machine
language is that the program of machine language runs very fast because no
translation program is required for the CPU.
Disadvantage of Machine Language
Here are some of the main
disadvantages of machine languages:
- Machine
Dependent -
the internal design of every computer is different from every other type
of computer, machine language also differs from one computer to another.
Hence, after becoming proficient in the machine language of one type of
computer, if a company decides to change to another type, then its
programmer will have to learn a new machine language and would have to
rewrite all existing program.
- Difficult
to Modify -
it is difficult to correct or modify this language. Checking machine
instructions to locate errors is very difficult and time consuming.
- Difficult
to Program -
a computer executes machine language program directly and efficiently, it
is difficult to program in machine language. A machine language
programming must be knowledgeable about the hardware structure of the
computer.
Assembly Language
It is another low-level
programming language because the program instructions written in this language
are close to machine language.
Assembly language is also
known as second generation of programming language.
With assembly language, a
programmer writes instructions using symbolic instruction code instead of
binary codes.
Symbolic codes are meaningful
abbreviations such as SUB is used for substation operation, MUL for multiply
operation and so on. Therefore this language is also called the low-level
symbolic language.
The set of program
instructions written in assembly language are also called as mnemonic code.
Assembly language provides
facilities for controlling the hardware.
Advantage
of Assembly Language
Here are some of the main
advantages of using assembly language:
- Easy
to understand and use - due to the use of mnemonic instead of
numeric op-codes and symbolic names for data location instead of numeric
addresses, it is much easier to understand and use in contrast with
machine language.
- Easier
to locate and correct errors - the programmers need not to
keep track of storage location of the data and instruction, fewer errors
are made while writing programs in assembly language and those that are
made, are easier to find and correct.
- Easy
to modify -
assembly language are easier to understand, it is easier to locate,
correct and modify instruction of an assembly language program.
- Efficiency
of machine language - an assembly language program will be just
as long as the resulting machine language program. Hence, leaving out the
translation time required by the assembler, the actual execution time for
an assembly language program and its equivalent machine language program.
Disadvantage
of Assembly Languages
And here are some of the main
disadvantages of using assembly language:
- Machine
dependent -
each instructions of assembly language program is translated into exactly
one machine language instruction, an assembly language programs are
dependent on machine language.
- Knowledge
of hardware required - assembly languages are machine dependent,
an assembly language programmer must have a good knowledge of
characteristics and logical structure of his/her computer to write a good
assembly language computer code.
- Machine
level coding -
assembly language instruction is substituted for one machine language
instruction. Hence like machine language programs, write assembly language
program is also time consuming and difficult.
2. High Level
Languages
The programming languages that are close to human
languages (example like English languages) are called the high-level languages.
The examples of high-level languages are:
- Fortran
- COBOL
- Basic
- Pascal
- C
- C++
- Java
The high level languages are similar to English
language. The program instructions are written using English words, for example
print, input etc. But each high level language has its own rule and grammar for
writing program instructions. These rules are called syntax of the language.
The program written in high level language must be
translated to machine code before to run it. Each high level language has its
own translator program.
The high level programming
languages are further divided into:
- Procedural
languages
- Non
procedural languages
- Object
oriented programming languages
Advantages of High Level
Languages
There are several advantages
of high level programming languages. The most important advantages are:
- Easy
to learn -
the high level languages are very easy to learn than low level languages.
The statements written for the program are similar to English-like
statements.
- Easy
to understand -
the program written in high level language by one programmer can easily be
understood by another because the program instructions are similar to the
English language.
- Easy
to write program -
in high level language, a new program can easily be written in a very
short time. The larger and complicated software can be developed in few
days or months.
- Easy
to detect and remove errors - the errors in a program can be
easily detected and removed. mostly the errors are occurred during the
compilation of new program.
- Built-in
library functions - Each high level language provides a large
number of built-in functions or procedures that can be used to perform
specific task during designing of new programs. In this way, a large
amount of time of programmer is saved.
- Machine
Independence -
program written in high level language is machine independent. It means
that a program written in one type of computer can be executed on another
type of computer.
Limitation of High Level Language
There are two main limitation
of high level languages are:
- Low
efficiency -
a program written in high level languages has lower efficiency than one
written in a machine/assembly language to do the same job. That is,
program written in high level languages result in multiple machine
language instruction that may not be optimize, taking more time to execute
and requiring more memory space.
- Less
flexibility -
high level languages are less flexible than assembly languages because
they do not normally have instructions or mechanism to control a
computer's CPU, memory and register.
Procedural Language
Procedural languages are also
known as third generation languages (3GLs). In a procedural language, a program
is designed using procedures.
A procedure is a sequence of
instructions having a unique name. The instructions of the procedure are
executed with the reference of its name.
In procedural programming
languages, the program instructions are written in a sequence or in a specific
order in which they must be executed to solve a specific problem. It means that
the order of program instructions is very important.
Some popular procedural
languages are described below:
- FORTRAN it
stands for formula translation. It was developed in 1957 for IBM
computers. It was the first earliest high level programming language used
to introduce the concept of modular programming. It has been revised many
times. Its commonly used version is FORTRAN 77
- COBOL - it
stands for common business oriented language. It was developed in 1959.
this high-level language was specially developed for business and
commercial applications. It was suitable for handling large amount of data
such as:
- To
prepare payroll
- To
process credit and debit account
- To
control inventory system and many other business applications
- Pascal - this
programming language is named in the honour of Blaise Pascal, a
mathematician and scientist who invented the first mechanical calculator.
Structured programming language and is popular in computer science
development in 1971. It is suitable for scientific field.
- ADA - it is
developed in 1980 and is named in the honour of Lady Augusta ADA. She was
the first computer programmer. The high level structure language Pascal
was used as a model for the development of ADA language. This language is
mainly used for defence purposes such as for controlling military weapons
like missiles etc.
- C
Language -
Dennis Ritchie and Brian Karnighan developed it in 1972 at Bell
Laboratories. It is a high level language but it can also support assembly
language codes (low level codes). It is because, C language is also
referred to as middle level language. The program written in C can be compiled
and run on any type of computer. In other words programs written in C
language are portable. C language is a structured programming language.
The main feature of C language is that, it uses a large number of built-in
functions to perform various tasks. The user can also creates its own
functions.
Non Procedural Languages
Non procedural programming
languages are also known as fourth generation languages. In non procedural
programming languages, the order of program instructions is not important. The
importance is given only to, what is to be done.
With a non procedural
language, the user/programmer writes English like instructions to retrieve data
from databases. These languages are easier to use than procedural languages.
These languages provide the user-friendly program development tools to write
instructions. The programmers have not to spend much time for coding the
program.
The most important non
procedural languages and tools are discussed below:
- SQL - it stands
for structured query language. it is very popular database access language
and is specially used to access and to manipulate the data of databases.
The word query represents that this language is used to make queries (or
enquiries) to perform various operations on data of database. However, SQL
can also be used to Create table, add
data, delete data, update data of database tables etc.
- RPG
-
it stands for report program generator. This language was introduced by
IBM to generate business reports. Typically, RPG is used for application
development on IBM midrange computers, such as AS/400.
Object Oriented Programming Languages
The object oriented
programming concept was introduced in the late 1960s, but now it has become the
most popular approach to develop software.
In object oriented
programming, the software is developed by using a set of interfacing object. An
object is a component of program that has a set of modules and data structure.
The modules are also called methods and are used to access the data from the
object. The modern technique to design the program is object oriented approach.
It is a very easy approach, in which program designed by using objects. Once an
object for any program designed, it can be re-used in any other program.
Now-a-days, most popular and
commonly used object oriented programming (OOPs) languages are C++ and Java.
The
Evolution Of Programming Languages
Generation |
Language |
Approximate
Development Date |
Sample Statement Or Action |
First |
Machine Language |
1940s |
010101 |
Second |
Assembly Language |
1950s |
MVC |
Third |
High-Level Language |
1960s |
Read Sales |
Fourth |
Query And DataBase Language |
1970s |
Print Employee Number If Gross Pay>1000 |
Beyond Fourth |
Natural And Intelligent Languages |
1980s |
If Gross Pay is Greater Than40,Then Pay The Employee
Overtime Pay |
Comments
Post a Comment