Programming language | Definition, Types, Advantages and Disadvantages

A programming language is a language that computers understand and utilize to do what the users of the program want. It is a set of codes and symbols that serve as a foundation for telling computers to carry out specific activities. The process of writing a program is known as coding or programming, and the individual who develops the program codes is known as a programmer.

Programming language

Programming languages are classified into two categories based on their nature. They are:

  1. General-purpose programming languages: to solve almost all types of issues.
  2. Specific purpose programming languages: to solve issues of a specific nature.

Note: Programming languages are classified into two categories in general. They are: Low-Level Language and High-Level Language

Low-Level Languages (LLL)

There are two forms of low-level language:

  • Machine language (1GL)
  • Assembly language (2GL)

I. Machine language:

Machine language is a language that is written in binary code (made of 0 and 1) and is used by computers. In this language, a computer can understand every instruction given only in the form of 0 and 1. Binary operations are used to accomplish all acceptable computer operations.

The advantages of Machine language are:

There is no need to translate a program written in machine language. Despite the fact that writing a program in machine language is extremely tough, a program written in machine language runs quicker than any other program.

The disadvantages of Machine language are:

  1. Machine language is very machine-dependent. It is not possible to run a program built for one processor on another i.e. a machine code of an Intel processor doesn’t work for the Motorola processor.
  2. Machine language has to be written in the form of 1 and 0. As a result, writing programs in machine language can be highly stressful.
  3. Chances of error are high while writing a program in machine language.
  4. It is very difficult to debug the program written in machine language.
  5. It is very time-consuming and difficult to solve complex problems in this language.

II. Assembly language:

Assembly language is a programming language in which a program is written using shortcodes like ADD, MUL, or SUB instead of binary numbers (0 and 1). Because a computer can only interpret instructions written in binary form, an assembler transforms assembly language to machine language to make it understandable by computer hardware.

Assembly language is not a user-friendly language. This language is also a very processor-dependent language. Software designed for one processor will not run on another. This is the language that most computer viruses are written in.

The advantages of Assembly language are:

  1. Machine language is more difficult to comprehend than assembly language.
  2. Unlike machine language, it is easier to modify.
  3. Chances of error are less than machine language.
  4. In assembly language, program execution time is faster than a program written in any high-level language.
  5. As compared to machine language, assembly language is a more standard form of language.
  6. We do not need to take care of data storage location and instruction while writing a program in assembly language.
  7. This language is more efficient in solving hardware interfacing problems.

Some of its disadvantages/ limitations are:

  1. It is a processor (Machine Dependent Language).
  2. Since it is a machine-dependent language, it requires knowledge of hardware while writing a program.
  3. The assembly language and machine language instruction have a one-to-one connection.
  4. A program written in this language can be exceedingly long and hard to program.
  5. Execution of programs is slower and less efficient than machine language.

High-Level Languages (HLL)

High-level languages are languages that are highly similar to written English and are therefore much easier to use than machine code and assembly language. A language translator, sometimes known as a compiler or an interpreter, converts high-level languages into machine language.

In 1956, IBM Laboratory's John Backus created the first high-level language. High-level languages were developed in the 1960s to make programming easier and to overcome the constraints of low-level languages. High-level languages are of 3 types. They are:

  • Procedural oriented language (3GL)
  • Problem-oriented (4th generation language (4GL))
  • Natural (5th generation language (5GL))

I. Procedural oriented language:

Procedural Oriented Languages are the general-purpose programming language. It is also known as the 3rd generation languages (3GL). These are designed to express the logic and the procedure of a problem. Because they can handle a wide range of issues, procedural languages are extremely versatile. Examples are Pascal, C, BASIC, etc.

II. Problem-oriented language:

These languages are non-procedural languages that allow the users to specify what the output should be. Problem-oriented languages are one step forward from 3GL in that they don't go into great detail about how data is processed to get the desired outcome. These are result-oriented and need a translator like an interpreter or a compiler. Examples are PHP, C#, Visual Basic, etc.

4GL’s objectives include:

  1. To minimize the user’s effort to obtain information from a computer.
  2. Increase the program development speed.
  3. Errors are less likely to occur when writing programs.

III. Natural language:

These languages, often known as 5th generation languages (5GL), are still in development. When we're done, we'll be able to write statements that appear like conventional sentences. Natural languages such as English and other languages would be used on the computer making them more intelligent and user-friendly.

Some of its characteristics are:

  1. They improve the intelligence and naturalness of computers.
  2. They make humans and machines closer.
  3. They are used in the areas of research, robotics, defense system, and different types of expert systems.

The advantages of High-level languages are:

  1. High-level languages are machine-independent languages. So, it is portable (i.e. program written in one processor easily runs on another processor also).
  2. A program written in a high-level language is easier to learn because it is similar to the English language.
  3. It is user-friendly.
  4. The chance of error is less and it is very easy to debug.
  5. When compared to low-level languages, programming in high-level languages takes less time and effort.

The disadvantages of High-level languages are:

Because it requires more memory and time to execute, a program written in a high-level language is less efficient than a program written in assembly or machine code. Only machine or assembly language can be used to program or handle tasks relating to computer hardware. As a result, high-level languages cannot be used for these objectives.

Post a Comment

Please do not enter any spam link in the comment.

Previous Post Next Post