Classification of Programming Languages

     Classification of Programming Languages 


{tocify} $title= {Table of Contents}

What is Programming Language?

Language is a way of communication between two or more mediums. Programming is the language for computers or applications that are used for giving commands and instructions to the system. Programming languages are used by developers to create instructions that are meant to perform a particular task on the computer. A programming language defines a set of instructions that are compiled together to perform a specific task by the CPU (Central Processing Unit). The programming language mainly refers to high-level languages such as C, C++, Pascal, Ada, COBOL, etc.
Each programming language contains a unique set of keywords and syntax, which are used to create a set of instructions. Thousands of programming languages have been developed till now, but each language has its specific purpose. These languages vary in the level of abstraction they provide from the hardware. Some programming languages provide less or no abstraction while some provide higher abstraction. Based on the levels of abstraction, they can be classified into two categories:


  • Low-level language
  • High-level language
Programming languages are basically classified into two main categories – Low level language and High level language. However, there also exists another category known as Middle level language. Every programming language belongs to one of these category and sub-category.

Classification of programming languages

The image which is given below describes the abstraction level from hardware. As we can observe from the below image that the machine language provides no abstraction, assembly language provides less abstraction whereas high-level language provides a higher level of abstraction.

Abstraction level programming language provide


Knowing about programming helps in learning advancements in the IT sector, which is the game-changer in how computers are used in modern times. A computer language is also known as a programming language and is used to create software programs, apps, and scripts. Developers or programmers can give commands to computers with the help of programming languages. The programming done by the user is processed by the machine language, and the computer understands the instructions through that. There are tens of thousands of languages created now, but only a handful of them are used on a big scale. Languages like C, C++, Python, Java, Kotlin, JavaScript, PHP, and R languages are popular names among programmers. Different Types of Programming Languages Computer programming is generally of three types:

Low-level programming languages


The low-level language is a programming language that provides no abstraction from the hardware, and it is represented in 0 or 1 forms, which are the machine instructions. This language is machine-run and can understand only 0 and 1. The processor runs fast in it, and it does not require any compiler. It requires further continuous instructions from programmers to run smoothly.
Low-level languages are used to write programs that relate to the specific architecture and hardware of a particular type of computer. They are closer to the native language of a Computer (binary), making them harder for programmers to understand. Programs written in low-level languages are fast and memory efficient. However, it is nightmare to develop operating systems, device drivers, databases and applications that require direct hardware access.
Further, low-level language can be divided into two parts. The languages that come under this category are the Machine level language and Assembly language. The low-level programming languages can be divided into the following two types of languages, such as:

• Machine level languages
• Assembly level languages

• Machine level language


It is written in binary or hexadecimal form. It is not presented in mathematical language for humans to understand. Codes in machine language are different on every computer, which is why machine languages are tough to write. The machine-level language is a language that consists of a set of instructions that are in the binary form 0 or 1. As we know that computers can understand only machine instructions, which are in binary digits, i.e., 0 and 1, so the instructions given to the computer can be only in binary codes. Creating a program in a machine-level language is a very difficult task as it is not easy for the programmers to write the program in machine instructions. It is error-prone as it is not easy to understand, and its maintenance is also very high. A machine-level language is not portable as each computer has its machine instructions, so if we write a program in one computer will no longer be valid in another computer.
The different processor architectures use different machine codes, for example, a PowerPC processor contains RISC architecture, which requires different code than intel x86 processor, which has a CISC architecture. A computer can directly understand the binary language. Machine language is also known as the Machine Code.
As the CPU directly understands the binary language instructions, it does not require any translator. CPU directly starts executing the binary language instructions and takes very less time to execute the instructions as it does not require any translation. Low-level language is considered as the First Generation Language (1GL).

• Assembly language


The Assembly language is a step ahead of machine language. It allows programmers to assign values to codes. Programs can be written in short instead of writing full binary or hexadecimal.
The problems which we were facing in machine-level language are reduced to some extent by using an extended form of machine-level language known as assembly language. Since assembly language instructions are written in English words like move, add, sub, so it is easier to write and understand.
The assembly language code is not portable because the data is stored in computer registers, and the computer has to know the different sets of registers. The assembly code Is not faster than machine code because the assembly language comes above the machine language in the hierarchy, so it means that assembly language has some abstraction from the hardware while machine language has zero abstraction.
As we know that computers can only understand the machine-level instructions, so we require a translator that converts the assembly code into machine code. The translator used for translating the code is known as an assembler.
It can be easily translated into machine language. It is very useful when peripheral devices are connected to the computer as it needs detailing about the computer system.

Advantages of low-level languages


• Programs developed using low-level languages are fast and memory efficient.
• Programmers can utilize processor and memory in a better way using a low-level Language.
• There is no need of any compiler or interpreters to translate the source to machine code. Thus, cuts the compilation and interpretation time.
• Low-level languages provide direct manipulation of computer registers and storage.
• It can directly communicate with hardware devices.
Disadvantages of low-level languages
• Programs developed using low-level languages are machine dependent and are not portable.
• It is difficult to develop, debug and maintain.
• Low-level programs are more error-prone.
• Low-level programming usually results in poor programming productivity.
• A programmer must have additional knowledge of the computer architecture of a particular machine, for programming in the low-level language.

Differences between Machine-Level language and Assembly language


The following are the differences between machine-level language and assembly language:



High-level programming languages


High level language is abbreviated as HLL. High level languages are similar to the human language. Unlike low level languages, high level languages are programmers friendly, easy to code, debug and maintain. High level language provides higher level of abstraction from machine language. They do not interact directly with the hardware. Rather, they focus more on the complex arithmetic operations, optimal program efficiency and easiness in coding. The high-level language is a programming language that allows a programmer to write the programs which are independent of a particular type of computer. The high-level languages are considered as high-level because they are closer to human languages than machine-level languages. A compiler is required to translate a high-level language into a low-level language.

When writing a program in a high-level language, then the whole attention needs to be paid to the logic of the problem. The high-level language is very similar to human languages and has a set of grammar rules that are used to make instructions more easily. Every high-level language has a set of predefined words known as Keywords and a set of rules known as Syntax to create instructions. The high-level language is easier to understand for the users but the computer can not understand it. High-level language needs to be converted into the low-level language to make it understandable by the computer. We use Compiler or interpreter to convert high-level language to low-level language. High-level programming languages are the most complex ones. They need a compiler or interpreter to execute a program.
Languages like Python, PHP, C++, and Java are some examples of high-level programming languages. Languages like COBOL, FORTRAN, BASIC, C, C++, JAVA, etc., are examples of high-level languages. All these programming languages use human-understandable language like English to write program instructions. These instructions are converted to low-level language by the compiler so that it can be understood by the computer.

Advantages


• Writing instructions in a high-level language is easier.
• A high-level language is more readable and understandable.
• The programs created using high-level language runs on different machines with little change or no change.
• Easy to understand, create programs, find errors and modify.

Disadvantages


• High-level language needs to be translated into low-level language.
• High-level language executes slower compared to middle and low-level languages.

Differences between Low-Level language and High-Level language

The following are the differences between low-level language and high-level language:





Post a Comment (0)
Previous Post Next Post