answersLogoWhite

0


Best Answer

Compiler -- reads human-readable source code, produces machine-executable binary code. Examples are C, COBOL, Java, etc. Easiest for humans to program, but does not always produce the most efficient executables.

Interpreter -- Reads human-readable code, line at a time, and produces and executes machine instructions "on the fly". Example is good old BASIC. Good for testing, but is VERY slow.

Assembler -- Converts machine-manipulation coding directly into binary machine instructions. Produces the most efficient executables, but is the most difficult (for humans) to work with.

Best of all worlds (my opinion) is C on Unix, for speed, ease of use, program efficiency.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

"Compiler" & "Interpreter" are used to convert high level language(our language) to

machine language(byte code).

INTERPRETER

Actually, interpreters are used in simple programming languages such as logo, qbasic, etc.

They convert the high level language to byte code line by line. If any "error" occurs then the interpretation stops & the line containing error is shown.

COMPILER

Compilers are used in complicated programming languages such as c++, java, etc.

They convert the whole block of sentences in high level languages at once to byte code and display the errors at once,if any.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago
  • An assembler uses mnemonics for machine code instructions and in general generates one machine code instruction for each assembly language instruction. A different assembly language is needed for each computer architecture.
  • A compiler translates High Order Language statements to machine code, each statement generates many machine code instructions. One High Order Language is portable across many computer architectures.
  • An interpreter interprets High Order Language statements without generating any machine code. One High Order Language is portable across many computer architectures. Interpreters are usually much slower than executing machine code generated by compilers or assemblers, but you don't have to spend time compiling and/or assembling before it will run.

Note: if you haven't run into the terminology High Order Language before, it is just the military terminology for what civilians call High Level Language. After 30 years of working for a military avionics subcontractor I still tend to use the military terminology.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

They are very different indeed. Assembler language is a low-level symbolic language that directly translates into machine code, with very little in the way of abstraction. That is; there is a one-to-one translation from the source to the resultant machine code. Moreover, the resultant machine code can be subsequently disassembled to reproduce the original assembler source, albeit without the comments and user-defined symbols that were in the original assembler source. Due to the low level of abstraction, assembler code is machine-specific, thus assembler code created for one platform is unsuitable for assembly upon another platform; it must be completely re-written to suit that other platform. In some cases, the modifications may be so minor that software can perform the majority of translation, but generally it requires a large amount of human-involvement to port assembler code between platforms.

Compilers and interpreters work very differently. The assumption here is that the language is high-level, which means it is highly abstract. What this means is that the language is more generalised and is almost completely separated from the underlying hardware. Thus the programmer can write a single source program that can be compiled upon a wide variety of platforms with little or no modification to the source code. Where portions of code must be platform specific (such as when accessing specific architecture features), the programmer can use conditional programming to filter code for each supported platform, thus the same code compiles differently depending on the platform it is compiled upon. Each platform has its own compiler and it is the compiler's responsibility to translate the high-level instructions into machine-specific code. However, unlike assembler, the resultant machine code cannot be subsequently disassembled to reproduce the original source code -- only the disassembled code can be reproduced. That is, once the abstraction is eliminated by the compiler, it cannot be reproduced.

Compilers and interpreters differ in that compilers translate the entire source into machine-readable code (compilation is actually a two-stage process where the source is first compiled to produce object source files which are subsequently linked to produce the final machine-code), whereas interpreters translate code into machine code one statement at a time, execute it, and then move onto the next statement. If any statements are executed more than once (such as a function call or statements within a loop structure), those statement need to be re-interpreted each time they are encountered. As a result, interpreted languages are extremely slow compared to compiled languages.

There are also languages that are both compiled and interpreted. Java, for instance, compiles to byte code (rather than machine code) which is suitable for interpretation by the Java virtual machine (JVM). The advantage is that a Java program source need only be compiled once and can then be interpreted by any machine that supports a JVM implementation (and very few don't have one these days), thus Java a highly-portable language. By contrast, compiled languages must be compiled separately for each platform, which makes them less portable, but they will run many times quicker.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Distinguish between the concept assembler compiler and interpreter?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between interpreter and parser and compiler?

in my personal point of view i would say a parser is more like "one-directional" "automatic" vs. an interpreter, the interpreter has more "intelligence"


What are the similarities between compiler and interpreter?

Both compiler and interpreter are the language programs that translates source program into machine code or we can say object code. Both are used to find errors in source program.


What is difference between assembler and linker?

There is no definite term "assembler" in compilation process. It is more like "compiler" and "linker". Assembler usually refers to a compiler of machine language: http://en.wikipedia.org/wiki/Assembly_language So you probably mean difference between compiler and linker? Lets say you have a 3 module program, and it uses a 3rd party library, then the compiler will just compile each of your modules (separately) into binary pieces, which have "unclosed" references to abovementioned library and other 2 modules. After u have 3 binary pieces comes in "linker" it attaches those "unclosed" (or unlinked) links to other modules and library, therefore giving you working program file (.exe file for example). Really hard to say that without a schema or something like that:) Hope this answer helped you.


What is the difference between compilers and interpreters in c plus plus in tabular form?

C-compiler translates the C-source into Assembly or machine code. On the other hand, C-interpreter -- well, there is no such thing as C-interpreter.


What is compiler and assembler?

Both, compiler and assembler, are software tools which translate instructions written in a programming language into executable machine code. (Both will typically require additional tools, such as a linker, in the process.) An assembler recognizes a machine-specific assembly language. This is a low-level language with a one-to-one relationship between language (assembly) instructions and machine code instructions. A compiler recognizes a generally machine-independent language such as the C programming language. These are higher level languages compared to the assembly languages, generally offering a one-to-many relationship between language instructions and expressions, and the resulting machine code instructions.

Related questions

Similarities between compiler interpreter assembler?

Both are use to convert high level languages into machine language


What is the difference between computer interpreter assembler?

wee2


What is the different between Compiler and Interpreter in C or C plus plus programming?

It is easy to tell: there is no interpreter for C and C++, they are compiled languages.


Who is the best between a compiler and an interpreter?

There are very few languages (e.g. old BASIC variants in hobby computers) that have both interpreter and compiler, so your question hardly makes sense. Simply pick a language, and use it.


What is the difference between interpreter and parser and compiler?

in my personal point of view i would say a parser is more like "one-directional" "automatic" vs. an interpreter, the interpreter has more "intelligence"


What are the similarities between compiler and interpreter?

Both compiler and interpreter are the language programs that translates source program into machine code or we can say object code. Both are used to find errors in source program.


State two differences between a compiler and an interpreter?

# An interpreter translates from source code to machine code on-the-fly; a compiler does it all before the program is executed. # Compilers can spend a lot of time on analysis and optimization, allowing for (generally) better performance of code.


What's the difference between interpreter and translator?

Well , in computer terminology an interpreter is a translator which translates a source code line by line and executes it, while a translator is a big word it may have different types like compiler, interpreter, assembler etc. Answer In more specific language terms, an interpreter is a person who translates one language to another, for instance at the UN, where quick-wittedness and a good memory are attributes, whereas a translator converts a written work from from one language to another, where being methodical and having good research material to hand are advantages.


What is the difference between interpreter and translator?

An interpreter translates spoken language in real time, facilitating communication between individuals who do not speak the same language, while a translator converts written text from one language to another, preserving the original meaning and nuances of the content. Additionally, interpreters usually work with verbal communication, whereas translators work with written communication.


What is difference between assembler and linker?

There is no definite term "assembler" in compilation process. It is more like "compiler" and "linker". Assembler usually refers to a compiler of machine language: http://en.wikipedia.org/wiki/Assembly_language So you probably mean difference between compiler and linker? Lets say you have a 3 module program, and it uses a 3rd party library, then the compiler will just compile each of your modules (separately) into binary pieces, which have "unclosed" references to abovementioned library and other 2 modules. After u have 3 binary pieces comes in "linker" it attaches those "unclosed" (or unlinked) links to other modules and library, therefore giving you working program file (.exe file for example). Really hard to say that without a schema or something like that:) Hope this answer helped you.


What is the difference between compilers and interpreters in c plus plus in tabular form?

C-compiler translates the C-source into Assembly or machine code. On the other hand, C-interpreter -- well, there is no such thing as C-interpreter.


What is compiler and assembler?

Both, compiler and assembler, are software tools which translate instructions written in a programming language into executable machine code. (Both will typically require additional tools, such as a linker, in the process.) An assembler recognizes a machine-specific assembly language. This is a low-level language with a one-to-one relationship between language (assembly) instructions and machine code instructions. A compiler recognizes a generally machine-independent language such as the C programming language. These are higher level languages compared to the assembly languages, generally offering a one-to-many relationship between language instructions and expressions, and the resulting machine code instructions.