Monday, 3 December 2012

What is the difference between Compiler,Assembler and Interpreter

Assemblers

Assembly languages are more easily translated in to machine code than high-level programs languages. Each assembly language statement directly corresponds to one or more machine instructions. Another way to think about this is that assembly language code is simply an abbreviated form of machine code. Thus, to transform a program from an assembly language to machine code all that must be done is that the instructions must be converted from their mnemonic abbreviations into their equivalent string of ones and zeroes. This transformation process is known as assembling and is accomplished by an assembler.

Compilers

A compiler is a computer program that converts an entire program written in a high-level language (called source code) and translates it into an executable form (called object code).

Interpreters

An interpreter is a computer program that takes source code and converts each line in succession. At each step it executes the high-level statement. In other words, it doesn't have to examine the entire program before it can begin executing code. Thus, programs that are interpreted lend themselve to interactive programming. However, programs that are interpreted will generally run much slower than programs that are compiled. 

No comments:

Post a Comment