Generations and levels of programming languages.

programming language is a set of commands, instructions, and other syntax use to create a software program.


Low level PL

High level PL

Used to write programs that relate to the specific architecture and hardware of a particular type of computer.

Closer to the native language of a computer (binary), making them harder for programmers to understand.

One line of low level code of usually becomes one line of machine code

Examples: Machine Code, Assembly Language

Written in a form that is close to human language, enabling focus on the problem being solved.

No particular knowledge of the hardware is needed as high level languages create programs that are portable and not tied to a particular computer or microchip.

Called ‘high level’ as they are far removed from the machine code instructions understood by the computer.

One line of high level code of usually becomes many lines of machine code

Examples: C++, Java, Pascal, Python, Visual Basic


 

Low level PL

High level PL

Advantages

Can make use of special hardware or special machine-dependent instructions (e.g. on the specific chip)

Translated program requires less memory

Write code that can be executed faster

Total control over the code

Can work directly on memory locations

Easier to modify as it uses English like statements

Easier/faster to write code as it uses

English like statements

Easier to debug during development due to English like statements

Portable code – not designed to run on just one type of machine

Disadvantages

Programs developed using low level languages are machine dependent and are not portable.

Error detection and maintenance is a tedious and time taking process.

Low level programs are more error prone.

Low level programming usually results in poor programming productivity.

Programmer must have additional knowledge of the computer architecture of particular machine, for programming in low level language.

It takes additional translation times to translate the source to machine code.

High level programs are comparatively slower than low level programs.

Compared to low level programs, they are generally less memory efficient.

Cannot communicate directly with the hardware.


1. First Generation Language (Machine language)

Also called low-level programming language because they were used to program the computer system at a very low level of abstraction. i.e. at the machine level. The machine language also referred to as the native language of the computer system is the first generation programming language. In the machine language, a programmer only deals with a binary number.

Advantages of first generation language

  • They are translation free and can be directly executed by the computers.

  • The programs written in these languages are executed very speedily and efficiently by the CPU of the computer system.

  • The programs written in these languages utilize the memory in an efficient manner because it is possible to keep track of each bit of data.

2. Second Generation language (Assembly Language)

Comprises assembly languages that use the concept of mnemonics for the writing program. In the assembly language, symbolic names are used to represent the opcode and the operand part of the instruction.

Advantages of second generation language

  • It is easy to develop, understand and modify the programs developed in these languages compared to those developed in the first generation programming language.

  • The programs written in these languages are less prone to errors and therefore can be maintained with a great case.

3. Third Generation languages (High-Level Languages)

Designed to overcome the various limitations of the first and second generation PL. They enable the programmer to concentrate only on the logic of the programs without considering the internal architecture of the computer system.

Advantages of third generation programming language

  • It is easy to develop, learn and understand the program.

  • As the programs written in these languages are less prone to errors they are easy to maintain.

  • The program written in these languages can be developed in very less time as compared to the first and second generation language.

Examples: C, C++, C#, Java, BASIC, Pascal, Fortran, ALGOL, COBOL

4. Fourth generation language (Very High-level Languages)

Required a lot of time and effort that affected the productivity of a programmer. Designed and developed to reduce the time, cost and effort needed to develop different types of software applications.

Advantages of fourth generation languages

  • These programming languages allow the efficient use of data by implementing the various databases.

  • They require less time, cost and effort to develop different types of software applications.

  • The programs developed in these languages are highly portable as compared to the programs developed in the languages of other generations.

Examples: SQL, CSS, coldfusion

5. Fifth generation language (Artificial Intelligence Language)

Focus on constraint programming. The major fields in which the fifth generation PL are employed are Artificial Intelligence and Artificial Neural Networks

Advantages of fifth generation languages

  • These languages can be used to query the database in a fast and efficient manner.

  • In this generation of language, the user can communicate with the computer system in a simple and easy manner.

Examples: mercury, prolog, OPS5



Translators translate a high-level language program into a machine language program that the central processing unit (CPU) can understand.  It also detects errors in the program.


Compiler is a translator used to convert high-level programming language to low-level programming language.  It converts the whole program in one session and reports errors detected after the conversion. Compiler takes time to do its work as it translates high-level code to lower-level code all at once and then saves it to memory.

Interpreter is used to convert high-level programming language to low-level programming language. It converts the program line by line and reports errors detected at once, while doing the conversion. With this, it is easier to detect errors than in a compiler. 




Last modified: Tuesday, 16 April 2024, 3:35 PM