answersLogoWhite

0


Best Answer

Interpreters translate source code into machine while it is executing. The machine code is not saved, thus the code must be translated on every execution. As a result, the code is larger and very much slower than an equivalent machine code executable would be. However, the source code is highly portable.

Compilers translate the whole program at once to produce a machine code executable that requires no further translation. However, the machine code is non-portable and must be recompiled for each supported platform.

Some language compile to byte code rather than machine code. Byte code is best thought of as being the native language of a virtual machine rather than a physical one. The virtual machine then interprets the byte code to produce the machine code. Like all interpreted languages, the byte code is highly portable, and while quicker to interpret than source code, is still very much larger and slower than compiled native machine code.

User Avatar

Gertrude Carroll

Lvl 10
1y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

A compiler is a computer program (or set of programs) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.

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 or machine code). A program that translates from a low level language to a higher level one is a decompiler. A program that translates between high-level languages is usually called a language translator, source to source translator, or language converter. A language rewriter is usually a program that translates the form of expressions without a change of language.

A compiler is likely to perform many or all of the following operations: lexical analysis, preprocessing, parsing, semantic analysis, code generation, and code optimization.

Program faults caused by incorrect compiler behavior can be very difficult to track down and work around and compiler implementors invest a lot of time ensuring the correctness of their software.

The term compiler-compiler is sometimes used to refer to a parser generator, a tool often used to help create the lexer and parser.he term compiler-compiler is sometimes used to refer to a parser generator, a tool often used to help create the lexe
This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Technically, Java isn't usually compiled. It usually runs on a VM (virtual machine), which interprets the code at run-time. This is why Java is usually slower than "real" compiled languages, such as C, C++, etc. However, in some cases, Java code is compiled to "byte code", and then executed, which speeds up execution dramatically.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Compiler and interpreter are system softwares which convert your code into machine language.

Compiler converts the code of the complete source file at once whereas interpreter does the same job line by line.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

It has been my experience that executable code that has been generated by a compiler is much faster.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

A compiler is a programme which converts the language in which u write the programme to machine language.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the function of compiler and an interpreter?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How many model of compiler?

combination of interpreter and compiler.


Which type of translater is used by GW BASIC either compiler or interpreter?

its an interpreter


How compiler differ form interpreter?

because the compiler convert whole of the sentence once into the machine langauge but the interpreter convert one by one


Which produces faster program execution a compiler or pure interpreter?

A compiled program would execute faster than an interpreter running the same code step by step.


Is there used compiler or interpreter in HTM?

A htm file is interpreted, not compiled. A browser acts as the interpreter.


Why does compiler better than interpreter?

There is no point in comparison.


Which is the host language uses to develop Compiler or interpreter?

You will have to ask the compiler and interpreter writers that question. What I can tell you with certainty, at one time all programs were hand assembled.


Who takes more memory space interpreter or compiler?

Interpreters


What compiler and interpreter effect the speed of computer?

need to get to mars


Who will take more memory space compiler or interpreter?

Interpreters


Examples of computer language translators?

Assembler Interpreter Compiler


What is compilers and interpreters the purpose?

compiler and interpreter used to convert high level language to machine level language .....compiler does dis job in atonce while interpreter does in step by step