Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Programming Basics/Introduction/What is a translator?

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The execution of a program depends on the programming language. For example, a program written in a high-level language cannot be executed right away, because it is written in source code, and the source code is only human-readable and therefore cannot be understood by computers. The source code must therefore be translated into machine code with the help of a translator. What is a translator? A translator is a program that translates the program code into machine code. There are different types of translators. High-level languages can be translated into machine code in two different ways, either by using an interpreter, which allows to translate instructions line by line. What is an interpreter? An interpreter is a translator that converts source code into machine code one instruction at a time. Or by using a compiler, which allows to translate all the instructions at once. What is a compiler? A compiler is a translator that converts source code into machine code all in one go. Any low-level language written in assembly code can also not be understood by computers. Assembly code is translated into machine code using an assembler. What is an assembler? An assembler is a translator that converts assembly code into machine code.