- Types of Languages:-
Several Programming languages have been developed for writing computer programs. These programming languages are divided into two main categories.
These are:
- Low Level Languages
- High Level Languages
- Low Level Languages:-
The Programming languages that are very close to machine language are called ''Low Level Languages''. The program instructions written in these languages are in binary form (0 and 1) and symbols. There are two examples of low level languages:
- Machine Language
- Assembly Language
- Machine Language:-
There is no need to translate the program written in machine language. It is because the instructions are already in machine code. However programs written in any other programming language must be converted into machine language, So that the computer can understand them.
A program written in machine language is machine dependent. Every type of computer has its own set of rules for writing program in machine language. Program written on one type of computer system cannot run on another different type of Computer.
The machine language is very different to learn and to use. The Programmer has to write four or five instructions to perform a simple task.
- For Example:-
To perform simple addition operation, A set of instructions is written to move the numbers from memory location to one of the registers. Similarly, A set of instructions is required to perform the actual addition operation and to receive the result for storing into memory.
- Assembly Language:-
In assembly language, symbols (or English like words) are used to write program instructions, instead of binary code. These symbols or English like words are called mnemonics.
For Example:
The add instruction is represented by ADD.
The program written in assembly language cannot be executed directly on the computer. It is translated into the machine code with the help of translator program called the Assembler.
Assembly language is easy to learn than machine but it has some disadvantages. These are:
v Assembly language is machine dependent.
v For Example:
Program written on one type of computer cannot be executed on another type of computer.
v It does not allow writing large programs efficiently and easily.
A deep knowledge of hardware architecture is required to write a program.- High Level Languages:-
The programming languages that are close to human languages (e.g like English language) are called High level Languages. The program instructions written in these programming languages are similar to English language. Unlike low level languages, these languages are easy to learn. The example of High level Programming languages are:
C, C++, Java, FORTRAN, BASIC, Pascal, COBOL etc.
Every High level language has its own set of rules for writing program. These rules are called the Syntax of languages.
A program written in high level language is called the source program or Source code. The source code cannot be run directly on the computer. It must be translated into machine code, called Object Code. The source code is translated into machine code with the help of translator program, called language translator or language processor.
Every High level programming language was designed for a specific purpose. Some of high levels programming languages are used to write application programs or Software, while others are used to write system Software.
For Example:-
The programming languages C and C++ are mostly used to write system software such as Operating System etc. Similarly, the users of other high level programming languages are:
- Fortran:-
(Formula Translation) language is used to solve the mathematical problems in the fields of engineering and science.
- Cobol:-
(Common Business Oriented Language) is used to written the business applications.
- Java:-
Java is used for network programming and web page designing.