What is Translator Software?
Translator software is used to convert a program written in high-level language and assembly language to a form that the computer can understand. Translator software converts a program written in assembly language, and high-level language to a machine-level language program (Figure 6.13). The translated program is called the object code. There are three different kind of translator software:
- Compiler, and
Assembler converts a program written in assembly language to machine language. Compiler and interpreter convert a program written in high-level language to machine language. Let’s now discuss, briefly, the different kinds of translator software.
Difference Between a Compiler and An Interpreter:
Compiler and Interpreter are used to convert a program written in high-level language to machine language; however, they work differently. The key differences between a compiler and an interpreter are as follows:
- Interpreter looks at a source code line-by-line. Compiler looks at the entire source code.
- Interpreter converts a line into machine executable form, executes the line, and proceeds with the next line. Compiler converts the entire source code into object-code and creates the object code. The object code is then executed by the user.
- For a given source code, once it is compiled, the object code is created. This object code can be executed multiple number of times by the user. However, interpreter executes line-by-line, so executing the program using an interpreter means that during each execution, the source code is first interpreted and then executed.
- During execution of an object code, the compiler is not required. However, for interpretation, both interpreter and the source code is required during execution (because source code is interpreted during execution).
- Since interpreter interprets line-by-line, the interpreted code runs slower than the compiled code.
What is Translator Software? What Assembler, Compiler and Interpreter? Difference Between a Compiler and An Interpreter, What is Translator Software? , What Assembler, Compiler and Interpreter?, Difference Between a Compiler and An Interpreter, Difference Between a Compiler and An Interpreter is,