Types of Programming Language | Language Translators

Programming  Languages 

Before learning about c programming it is important to know about different types of programming languages and their specific features.There is always a change in scenario of popularity of programming language depending upon the need and simplicity of programmer.
Programming language are classified into two types.



1. Low Level Language

It is a machine understandable language.They are further divided in two categories.

1.a  Machine Level Language

Computer can understands only binary digits which are 0's and 1's. So the instruction given to the computer can only be in binary code .Computer can only read binary code. So ,Every instructions must be in binary code i.e.. in the form of 0's and 1's.
This Machine level language is difficult to understand this language by normal people. it is machine level language. also, this language is not in readable form. A machine level is more prone to errors and maintenance is high.
Programs written in machine level language are not portable as they are for specific machine which means that program written for one machine cannot be able to run on another machine.

So there is a need of such a programming language which can increase readability and other lackings of machine level language.

1.b  Assembly Language

As we need a new programming language which can reduce limitations of  old machine level language. So , Assembly language overcome some of the limitations of machine level language by some extent.
It uses modified form of machine level language.This language uses English like word ,such as MOV , ADD, SUB etc..So it is easier to read and write such a language.
These English words are called Mnemonics.
In Assembly language, data is stored in registers and each computer has different set of registers.also,assembly language is not portable 
Since Computer can understand only machine level language so we need to convert this language into machine level language by using some sort of tools. Assembler is used to convert Assembly language to Machine level language. Assembler is a language translator.
Writing program in Assembly Language is easy but it does not satisfy programmers. they want to make programming more easy so that its knowledge can be spread in whole world .
Therefore, they are  looking for some more easy language.

2. High Level Language

High level language are designed in order to overcome each and every limitations of the Assembly language. These language are machine independent.These are English like language,so it is more easy to understand and write program in high level language as compared to assembly language and machine level programming language.
While writing programs in high level language ,programmer is not concerned with the low level details so that whole attention of programmer can be paid to logic of problem being solved.
Since it is high level language and computer didn't understand high level language ,so we need some translator which can convert our code to machine level language.
Translator which can be used are Compiler or interpreter. Every language has its own compiler or interpreter.
Some Examples of High Level Language are C,C++,JAVA, PYTHON ,FORTRAN ,COBOL, BASIC.

Language Translators 

Computer can understands only machine level language. so it is important to convert assembly language and high level language into machine level language. For this purpose we are using translators which will convert English  code into 0's and 1's form.
There are three types of translators.






1. Assembler 

It is used to convert assembly language into machine level language. so that machine can easily understand that machine level code.

2. Compiler

It is used to convert high level language code into machine language code. The code written in high level language is known as source code and code after compilation , machine level code is known as  object code.
Before converting code into machine level  language it should be made free from errors.
compiler converts our source code into machine code in one go. It means it will compile it then after compiling whole program it will show you errors,if any.

3. Interpreter

It is used to convert high level language code into machine language code. The code written in high level language is known as source code and code after compilation , machine level code is known as  object code.
Before converting code into machine level  language it should be made free from errors.
Interpreter converts our source code into machine code line by line It means it will interpret line by line, then after interpreting single line it will show errors,if any. this process will continue until program is free from errors. It means that after checking one statement , it converts that statement into machine code and then executes that statement. This will continue until last statement of program occurs.



Comments

Popular posts from this blog

Coding tips for Developers

Master Data Structure & Algorithms in Python

How to Start with Coding: A Beginner's Guide