Translator (computing)

Print Print
Reading time 6:14

A translator or programming language processor is a generic term that can refer to anything that converts code from one computer language into another.[1][2] A program written in high-level language is called source program. These include translations between high-level and human-readable computer languages such as C++ and Java, intermediate-level languages such as Java bytecode, low-level languages such as the assembly language and machine code, and between similar levels of language on different computing platforms, as well as from any of the above to another.[1]

The term is also used for translators between software implementations and hardware implementations (ASICs microchips) of the same program, and from software descriptions of a microchip to the logic gates needed to build it.[citation needed]

Different types of translators

There are 3 different types of translators as follows:

Compiler

A compiler is a translator used to convert high-level programming language to low-level programming language. It converts the whole program in one session and reports errors detected after the conversion. The compiler takes time to do its work as it translates high-level code to lower-level code all at once and then saves it to memory. A compiler is processor-dependent and platform-dependent. It has been addressed by alternate names as the following: special compiler, cross-compiler and, source-to-source compiler.[3][4][5]

Interpreter

The interpreter is similar to a compiler, as it is a translator used to convert high-level programming language to low-level programming language. The difference is that it converts the program one line of code at a time and reports errors when detected, while also doing the conversion. An interpreter is faster than a compiler as it immediately executes the code upon reading the code. It is often used as a debugging tool for software development as it can execute a single line of code at a time. An interpreter is also more portable than a compiler as it is processor-independent, you can work between different hardware architectures.[6][7][5]

Assembler

An assembler is a translator used to translate assembly language into machine language. It has the same function as a compiler for the assembly language but works like an interpreter. Assembly language is difficult to understand as it is a low-level programming language. An assembler translates a low-level language, such as an assembly language to an even lower-level language, such as the machine code.[8][9]

See also

  • Binary translator (binary-to-binary, typically code)
  • Assembly language translator (low-level source-to-source, code)
  • Source-to-source translator (high-level source-to-source, code)
  • Rewriter (source-to-source, typically code)
  • File converter (binary-to-binary, typically data)
  • Transcoder (binary-to-binary, data)

References

  1. ^ a b Thornton, Scott (2017-02-17). "What are compilers, translators, interpreters, and assemblers?". MicrocontrollerTips. Archived from the original on 2019-07-19. Retrieved 2020-02-02.
  2. ^ "Translators And Utilities For Program Development". Software Handbook (PDF). Intel Corporation. 1984 [1983]. p. 3-1. 230786-001. Archived (PDF) from the original on 2020-01-29. Retrieved 2020-01-29.
  3. ^ https://teachcomputerscience.com/translators/
  4. ^ https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/
  5. ^ a b Schuerer, Katja; Letondal, Catherine; Deveaud, Eric (2008-02-04) [2003-01-06]. "Chapter 5. Program execution, Section 5.2. Interpreter and Compiler". Introduction to Programming using Python - Programming Course for Biologists at the Pasteur Institute. pasteur.fr. Pasteur Institute. pp. 37–40. Archived from the original on 2015-11-11. Retrieved 2015-01-07. [1]
  6. ^ https://teachcomputerscience.com/translators/
  7. ^ https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/
  8. ^ https://teachcomputerscience.com/translators/
  9. ^ https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/

Further reading

By: Wikipedia.org
Edited: 2021-06-18 19:33:53
Source: Wikipedia.org