8. Computer Programming Languages
8. Computer Programming Languages
There are basically two types of computer programming languages given below:
The programming languages that are very close to machine code (0s and 1s) are called
low-level programming languages.
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.
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.
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
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.
And here are some of the main disadvantages of using assembly language:
The programming languages that are close to human languages (example like English
languages) are called the high-level languages.
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.
Procedural languages
Non procedural languages
Object oriented programming 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.
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
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:
o To prepare payroll
o To process credit and debit account
o 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.
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 tables, 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.
The object oriented programming concept was introduced in the late 1960s, but now it
has become the most popular approach to develop software.
Now-a-days, most popular and commonly used object oriented programming (OOPs)
languages are C++ and Java.