The machine code can be directly understood by the CPU. An assembler translates a low-level language, an assembly language to an even lower-level language, which is the machine code. Assembly language is difficult to understand as it is a low-level programming language. It is like a compiler for the assembly language but interactive like an interpreter. AssemblerĪn assembler is is a translator used to translate assembly language to machine language.
An interpreter is also more portable than a compiler as it is not processor-dependent, you can work between hardware architectures.
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 faster than a compiler as it immediately executes the code upon reading the code. With this, it is easier to detect errors than in a compiler. It converts the program one at a time and reports errors detected at once while doing the conversion. Just like a compiler, is a translator used to convert high-level programming language to low-level programming language. Before choosing a compiler, the user has to identify first the Instruction Set Architecture (ISA), the operating system (OS), and the programming language that will be used to ensure that it will be compatible. But it has been addressed by a special compiler, a cross-compiler and a source-to-source compiler. 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.Ī compiler is processor-dependent and platform-dependent. It converts the whole program in one session and reports errors detected after the conversion. There are 3 different types of translators as follows: CompilerĪ compiler is a translator used to convert high-level programming language to low-level programming language. It translates a high-level language program into a machine language program that the central processing unit (CPU) can understand. It discovers and identifies the error during translation. It takes a program written in source code and converts it into machine code.
A translator is a programming language processor that converts a computer program from one language to another.