Translator programs are software which translate high level language into machine language.
Writing a program using binary digits 0 and 1 is called machine language program because machine language consists of 0 and 1 only.
After translate by any translator software or translator programs, we get the object code which is executable and understandable to the machine. It is must before executing any program.
The CPU of a computer can only understand machine language and for this a program using this language can run very faster.
But making a program in machine language is so much hard as well as time spending. For this we use high level language today to make any program.
As the personal computer or organizational computer can only understand machine language so we need to convert our code of high-level language to the machine language.
We can do it by various translator programs or translator software now a days. This type of translator programs or software is called translator software.
Table of Contents
ToggleTypes of translator programs
There are mainly 3 types of translator programs we use today. These are as follows.
1. Compiler
Compiler is one of the popular translator programs in the world. The main function of compiler is to convert source code to the machine code.
Compiler stays in the secondary memory but we can take it to RAM whenever need. We need different compiler for different languages.
A specific compiler can convert only one programming language to the machine code.
After connecting with necessary file, we can create executable file from a program of machine code which can run with the help of operating system without the help of compiler.
Memory allocation is also a main function of compiler.
However, compiler is mostly used among programmers. There are many compilers for different language.
Some IDE (Integrated Development Environment) gives the facility to build in compilers.
For example, if you want to use codeblocks for writing C programs, then there is an advantage to install with mingw compiler which is very popular for compilation of C source code to object code.
Not only codeblocks but also there are so many IDE which offers installation with necessary IDE. However, this is not our topics today. So, lets come back to our topics.
Steps to execute a program
A translator program helps in various ways to execute a program by computer.
At first a special types of machine code named object code is made with the help of source code and necessary file which is stored as the object (.obj) file.
Then an executable file with (.exe) extension is made with the help of linking with others file from the object code which can run.
Compiler can detect error of linking and compiling. These error prevents the computer to make object or executable file.
- The error which occurs during compiling is called time error.
- The error during linking is called linking error.
- The error during execution is called run time error.
Merits of compiler
There are so many advantages or merits of using compiler. Here are only few most important merits of this type of translator software is given bellow;
- Compiler translates full program in a single attempt
- It gives faster speed and is the fastest translator program.
- Compiler can detect error.
- It allocates necessary storage in the main memory.
- Compiler can also print the source program.
- We need to compile a program at only one time.
Demerits of compiler
There are also some demerits of using compiler. These demerits are as follows;
- Compiler can’t detect an error step by step as it translates the whole program at a time.
- Debugging and testing is slower.
- Compiler takes a larger space in memory because it is a large translator program.
2. Interpreter
Interpreter is also a popular translator program in the world. The main function of interpreter is to convert a high-level language to the machine language.
Interpreter translates a program line by line where compiler translates a program at a time.
The translating process is continued until the whole program is not finished translating.
However, this types of translator software is not as popular as compiler now a days. But we should learn about them as they also have some great use in some case.
Merits of interpreter
Some of the very well known merits of interpreter is given bellow. You can think more.
- Interpreter is user friendly.
- Error handling is very easy by interpreter compared to the compiler.
- Interpreter does not take a large space in the memory as it is a small translator program.
- Interpreter is used in almost every small computer.
Demerits of interpreter
Some well known disadvantages of interpreter is discussed here bellow.
- Interpreter can’t convert a code in machine language at a time.
- Interpreter gives a slower speed.
- Interpreter is so hard to use for a general user.
- It is hard to memorize the instruction of interpreter.
- Interpreter is not good for execute a large program.
3. Assembler
Assembler is another translator program which is used to translate the code of assembly language.
Assembler can convert a mnemonic code (code of assembly languages) to the machine code.
It can also convert an address to machine language. Assembler stays in the secondary memory and can take in the RAM whenever required.
Assembler has already lost its popularity since assembly language is not using for making today’s software.
It can only be used to translate assembly language which is not in use among programmers today.
Main function of assembler
Here, are some most important functions of assembler. Let’s go through the list.
- Assembler is the only translator program to convert the mnemonic code (assembly code) into machine code.
- Assembler convert the assembly address to the machine code.
- Assembler test every instruction and inform to the user that it is right or wrong.
- Assembler puts every instruction and data to the main memory.
- It enforced the controller to start working from the first instruction after fixing the error of whole program.
- Assembler makes only one instruction consisting of the whole instructions of the assembly language.
Every translator programs has the importance in their specific fields. We can not ignore them at all.
We have to used the specific translator softwires for specific programming languages.
However, I have discussed widely about all translator programs in this post. I hope, you have got the necessary information reading the topics.
If you have any query still now about any translator programs then don’t forget to tell us in the comment section bellow.
This will motivate me. Please share your experience and opinion with others.
Recommended articles:
- Threat to computer | computer viruses and antivirus
- What is cyber security? All you need to know about cyber security
- What is Cyber Hijacking? 7 Main Types of Cyber Hijacking With Details
- How a computer takes decision? Decision taking overview of computer
- Number system and conversion of number system – Binary, Decimal, Octal and Hexadecimal
- What is CPU? What are the major parts of CPU
- Main 4 Functions Of A Computer
Howdy! This article couldn’t be written much better!
Looking at this article reminds me of my previous roommate!
He constantly kept preaching about this. I am going to
forward this article to him. Pretty sure he’ll have a great read.
Thank you for sharing!
I have been exploring for a little for any high-quality articles or weblog posts on this kind
of house . Exploring in Yahoo I eventually stumbled upon this site.
Studying this info So i’m satisfied to express that I’ve a
very just right uncanny feeling I discovered just what I needed.
I so much no doubt will make sure to do not omit this website and provides it a glance on a relentless basis.
I’m gone to tell my little brother, that he should also pay a visit
this blog on regular basis to take updated from most
up-to-date news update.
After looking at a number of the blog articles on your
website, I really appreciate your way of blogging.
I saved as a favorite it to my bookmark webpage
list and will be checking back soon. Please check out my web site too and let me know how you feel.