Hello student ,
Hello student
Hi,
The difference between compiler and assembler is that a compiler is used to convert high-level programming language code into machine language code. On the other hand, an assembler converts assembly level language code into machine language code.
Both these terms are relevant in context to program execution. The compiler considers the entire code and one and converts it at the same time. Whereas, the assembler, converts the code line by line.
Hope it helps.
Hello,
Difference between Compiler and Assembler:
Compiler
Assembler
Compiler converts the source code written by the programmer to a machine level language.
Assembler converts the assembly code into the machine code.
Compiler input source code.
Assembler input assembly language code.
It converts the whole code into machine language at a time.
But the Assembler can’t do this at once.
A Compiler is more intelligent than an Assembler.
But, an Assembler is less intelligent than a Compiler.
The compilation phases are lexical analyzer, syntax analyzer, semantic analyzer, intermediate code generated, a code optimizer, code generator, and error handler
Assembler makes two phases over the given input, first phase and the second phase.
The output of compiler is a mnemonic version of machine code.
The output of assembler is binary code.
C, C++, Java, and C# are examples of compiled languages.
GAS, GNU is an example of an assembler
I hope this info help you!
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile