Translating LanguagesTranslating 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. Show
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. Índice 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
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 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 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 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 |