395 Views

what is the difference between compiler and assembler


faheemtanha52 19th Nov, 2021
Answers (3)
Raj 19th Nov, 2021

Hello student ,

Hello student

  • Compiler is used to translate an high level programming language code to machine level code and to create an executable program. Assembler is used to translate an assembly level code to machine readable code.
  • Compiler checks the error in the program and reports them. All errors are to be removed otherwise code will not be compiled and executed.Assembler too checks the correctness of each instruction and reports the diagnosis report.
  • Compiler checks and converts the complete code at one time.Assembler generally does not convert complete code at one time.
  • Examples for compilers are C , C++ ,JAVA COMPILERS. Examples for assemblers are GAS , GNU assemblers
piyushkurwade 19th Nov, 2021

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.




Marwan 19th Nov, 2021

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!

Amity University-Noida B.Tech...
Apply
Among top 100 Universities Globally in the Times Higher Education (THE) Interdisciplinary Science Rankings 2026
Narayana Business School MBA/...
Apply
Top 30 Private B-Schools Nationally and Top 3 in Gujarat | Highest CTC- 20 LPA | Average CTC- 8.4 LPA | 40% Pre-Placement Offers | 670+ Recruiters 
JAGSoM PGDM Admissions 2026
Apply
Highest CTC 51.38 LPA | Median CTC 10.32 LPA | Top 25% Average CTC 14.32 LPA
IFMR Graduate School of Busin...
Apply
UGC Approved Programs | Near 100% Placement Record | Up to 100% Scholarships | Highest CTC 21.32 LPA
Amity University-Noida Law Ad...
Apply
Among top 100 Universities Globally in the Times Higher Education (THE) Interdisciplinary Science Rankings 2026
Great Lakes Institute of Mana...
Apply
Globally Recognized by AACSB (US) & AMBA (UK) | 17.8 LPA Avg. CTC for PGPM 2025
View All Application Forms

Download the Careers360 App on your Android phone

Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile

150M+ Students
30,000+ Colleges
500+ Exams
1500+ E-books