The program converted into machine language by the translator is called an object program

Translating Languages


Translating a computer programming language is conceptually very similar to translating one spoken language into another. In order for an English speaking person to understand Russian, for example, someone must translate the Russian language into English. This process of translating one language to another is also required by computers. Since machine language is the only language a computer can understand, all other languages must be translated into machine language.

Assembly and high-level languages are much more widely used by programmers than machine language. Since these languages cannot be executed directly by computers, they are converted into machine executable form by language-translator programs. The language-translator program translates the source program (that is, the sequence of instructions written by the programmer) into machine language. The translator program for assembly language programs is called an assembler program. A high-level language translator can be either a compiler program or an interpreter program. Assemblers, compilers, and interpreters are designed for specific machines and languages. For example, a compiler that translates a source program written in FORTRAN into a machine-language program can translate only FORTRAN programs.

This translated program (called the object program) is then "linked" with other object programs which reside in a system library to form what is referred to as the load module. It is the load module that is then executed by the CPU. The process of linking the application object program with the object programs in the system library is handled by the linkage editor. The object programs in the system library are combined to form the library and managed by the object module librarian program.

An interpreter, unlike assemblers and compilers, evaluates and translates a program one statement at a time. The interpreter reads each program statement checking for syntax errors and, if errors are found, generates an appropriate error message 'If there are no errors, the interpreter translates the statement into machine language and executes it before proceeding to the next statement. This is in contrast to an assembler or a compiler, which first checks the entire program for syntax errors and then translates the entire program into an object program that is executed. An interpreter program is typically smaller than an assembler or compiler program. An interpreter, however, can be inefficient. Program statements that are used more than once during a program's execution must be evaluated, translated, and executed each time the statement is used.


Last Updated Jan.8/99

A compiler is a computer program that translates a program written in a high-level language to the machine language of a computer. The compiler is used to translate source code into machine code or compiled code.
Click to see full answer

Índice

  • What converts a high-level language program into machine language?
  • Which converts the program written in assembly language to machine language?
  • What converts an assembly language into a machine language?
  • Who converts high-level language to machine language line by line?
  • Who converts high-level language program into machine language line by line?
  • Which converts a high-level language program into machine language line by line?
  • What helps in converting programming language to machine language?
  • Which of the following translation program converts assembly language programs to object programs?

What converts a high-level language to another high-level language?The most general term for a software code converting tool is “translator.” A translator, in software programming terms, is a generic term that could refer to a compiler, assembler, or interpreter; anything that converts higher level code into another high-level code (e.g., Basic, C++, Fortran, Java) or lower-level ( 17 Feb 2017

What converts a high-level language program to assembly language?

Compiler converts HLL to Assembly language and then assembler converts assembly language to LL language (machine code/object code)2.22 Dec 2016

What converts high-level language to assembly?

Compilers are a type of translator that support digital devices, primarily computers. The name compiler is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language, object code, or machine code) to create an executable program.

How does a high-level language get converted to low level language?

Compiler is a translator which is used to convert programs in high level langue to low level language. It translates the entire program that is group of statements at a time and also reports the errors in source program encountered during the translation.

Related Questions

What converts a high-level language program into machine language?

compilerA compiler is a translator program that converts a high-level language source program into a machine language object program.

Which converts the program written in assembly language to machine language?

assemblerAssembly code is converted into executable machine code by a utility program referred to as an assembler.

What converts an assembly language into a machine language?

assemblerAn assembler converts assembly language into machine language. A disassembler converts machine language into assembly.

Who converts high-level language to machine language line by line?

An Interpreter Converts a high-level language program into machine language, line by line.30 Aug 2021

Who converts high-level language program into machine language line by line?

Compiler converts a high level language program into machine language, line byline.6 Jun 2020

Which converts a high-level language program into machine language line by line?

compiler. A compiler is a translator program, which is used to convert a high- level language program into machine language. 2. It translates the whole program at once.

What helps in converting programming language to machine language?

A compiler takes the program code (source code) and converts the source code to a machine language module (called an object file).

Which of the following translation program converts assembly language programs to object programs?

Discussion Forum

Que.Which of the following translation program converts assembly language programs to object program
b. Compiler
c. Assembler
d. Macroprocessor
Answer:Assembler

1 more row

Translators, compilers, interpreters and assemblers are all software programming tools that convert code into another type of code, but each term has specific meaning. All of the above work in some way towards getting a high-level programming language translated into machine code that the central processing unit (CPU) can understand. Examples of CPUs include those made by Intel (e.g., x86), AMD (e.g., Athlon APU), NXP (e.g., PowerPC), and many others. It’s important to note that all translators, compilers, interpreters and assemblers are programs themselves.

Translators
The most general term for a software code converting tool is “translator.” A translator, in software programming terms, is a generic term that could refer to a compiler, assembler, or interpreter; anything that converts higher level code into another high-level code (e.g., Basic, C++, Fortran, Java) or lower-level (i.e., a language that the processor can understand), such as assembly language or machine code. If you don’t know what the tool actually does other than that it accomplishes some level of code conversion to a specific target language, then you can safely call it a translator.

Compilers
Compilers convert high-level language code to machine (object) code in one session. Compilers can take a while, because they have to translate high-level code to lower-level machine language all at once and then save the executable object code to memory. A compiler creates machine code that runs on a processor with a specific Instruction Set Architecture (ISA), which is processor-dependent. For example, you cannot compile code for an x86 and run it on a MIPS architecture without a special compiler. Compilers are also platform-dependent. That is, a compiler can convert C++, for example, to machine code that’s targeted at a platform that is running the Linux OS. A cross-compiler, however, can generate code for a platform other than the one it runs on itself.

A cross-compiler running on a Windows machine, for instance, could generate code that runs on a specific Windows operating system or a Linux (operating system) platform. Source-to-source compilers translate one program, or code, to another of a different language (e.g., from Java to C). Choosing a compiler then, means that first you need to know the ISA, operating system, and the programming language that you plan to use. Compilers often come as a package with other tools, and each processor manufacturer will have at least one compiler or a package of software development tools (that includes a compiler). Often the software tools (including compiler) are free; after all, a CPU is completely useless without software to run on it. Compilers will report errors after compiling has finished.

Interpreters
Another way to get code to run on your processor is to use an interpreter, which is not the same as a compiler. An interpreter translates code like a compiler but reads the code and immediately executes on that code, and therefore is initially faster than a compiler. Thus, interpreters are often used in software development tools as debugging tools, as they can execute a single in of code at a time. Compilers translate code all at once and the processor then executes upon the machine language that the compiler produced. If changes are made to the code after compilation, the changed code will need to be compiled and added to the compiled code (or perhaps the entire program will need to be re-compiled.) But an interpreter, although skipping the step of compilation of the entire program to start, is much slower to execute than the same program that’s been completely compiled.

Interpreters, however, have usefulness in areas where speed doesn’t matter (e.g., debugging and training) and it is possible to take the entire interpreter and use it on another ISA, which makes it more portable than a compiler when working between hardware architectures. There are several types of interpreters: the syntax-directed interpreter (i.e., the Abstract Syntax Tree (AST) interpreter), bytecode interpreter, and threaded interpreter (not to be confused with concurrent processing threads), Just-in-Time (a kind of hybrid interpreter/compiler), and a few others. Instructions on how to build an interpreter can be found on the web.[i] Some examples of programming languages that use interpreters are Python, Ruby, Perl, and PHP.

Assemblers
An assembler translates a program written in assembly language into machine language and is effectively a compiler for the assembly language, but can also be used interactively like an interpreter. Assembly language is a low-level programming language. Low-level programming languages are less like human language in that they are more difficult to understand at a glance; you have to study assembly code carefully in order to follow the intent of execution and in most cases, assembly code has many more lines of code to represent the same functions being executed as a higher-level language. An assembler converts assembly language code into machine code (also known as object code), an even lower-level language that the processor can directly understand.

Assembly language code is more often used with 8-bit processors and becomes increasingly unwieldy as the processor’s instruction set path becomes wider (e.g., 16-bit, 32-bit, and 64-bit). It is not impossible for people to read machine code, the strings of ones and zeros that digital devices (including processors) use to communicate, but it’s likely only read by people in cases of computer forensics or brute-force hacking. Assembly language is the next level up from machine code, and is quite useful in extreme cases of debugging code to determine exactly what’s going on in a problematic execution, for instance. Sometimes compilers will “optimize” code in unforeseen ways that affect outcomes to the bafflement of the developer or programmer such that it’s necessary to carefully follow the step-by-step action of the processor in assembly code, much like a hunter tracking prey or a detective following clues.

[i] “Let’s Build a Simple Interpreter”, https://ruslanspivak.com/lsbasi-part1