HitBrother

Difference Between Assembler , Compiler And Interpreter

Difference between Assembler, Compiler and Interpreter

Assembler

Defination: Assembler (computing), a computer program which translates assembly language to an object file or machine language format.

 

1. It translates the mnemonic codes such as PRN, ADD and SUB etc. to machine language code. It translates the high-level language to assembly language.

2. The program, which executes using assembler, executes faster because it directly converts the source code in machine language.

Read More: Algorithm And Pseudocode In C language With Example

Compiler

Defination: A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code.

1.It translates the high-level language to assembly language.

Advertisement

2.It takes the time to execute a program because it first translates the source code into another compiler’s
language and then using assembler converts it into machine language.

Difference between Compiler And Interpreter

Compiler

Defination: A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code.

1. Compiler translates the entire high-level language program into the machine language program at one before executing it. This optimises the use of machine language instructions in the translated program.
Therefore normally compiled programs run faster than Interpreted programs. The original high-level language program is called as source program. The compiled program i.e. machine language program generated by the compiler after translation is called object program.

'); var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://ad.admitad.com/shuffle/289c251618/'+subid_block+'?inject_to='+injectTo; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); })();

2. Object code is permanently saved for future use.

3.No time-consuming translation method.

4. It requires large space in the computer.

5. Speed of a computer is very fast.


6. Any change in source program after the compilation requires recompiling of the entire code.

Interpreter

Defination: In computer science, an interpreter is a computer program that directly executes, i.e. performs, instructions written in a programming or scripting language, without previously compiling them into a machine language program.

1.The Interpreter translates the program written in high-level language into machine language at the time of executing that program, instructions by instructions. That is, it read the first instruction written in the program     and converts that into equivalent machine language instructions. Then the CPU executes those machine language instructions. After that, the interpreter reads and translates the next instruction and so on.


2. No object code is saved for future use.

3.Time-consuming translation method.

4. Interpreter is easy to write and do not require large memory space in the computer.

5. Speed is very slow.

6. Any change in source program during the translation does not require retranslation of the entire code.

 

Advertisement