What's difference b/w assemblers & compilers

  • Thread starter Thread starter pairofstrings
  • Start date Start date
  • Tags Tags
    Difference
Click For Summary
SUMMARY

Assemblers and compilers serve distinct roles in programming language translation. Assemblers convert input instruction strings directly into machine language bit patterns, functioning primarily as "English" to "Machine" translators. In contrast, compilers translate high-level programming languages like C or Fortran into machine language, often resulting in a one-to-many relationship between input and output. Compilers can also generate assembly language, which can subsequently be processed by an assembler to produce machine code.

PREREQUISITES
  • Understanding of assembly language and machine code
  • Familiarity with high-level programming languages such as C and Fortran
  • Knowledge of the compilation process and its stages
  • Basic concepts of macro expansion in programming
NEXT STEPS
  • Research the process of compilation in detail, focusing on tools like GCC (GNU Compiler Collection)
  • Explore the role of assembly language in the software development lifecycle
  • Learn about macro expansion techniques in assemblers
  • Investigate the differences between various compilers and their optimization techniques
USEFUL FOR

Software developers, computer science students, and anyone interested in understanding the fundamentals of programming language translation and the roles of assemblers and compilers.

pairofstrings
Messages
411
Reaction score
7
Can you tell me the differences between compilers and assemblers? why are they named different?
 
Technology news on Phys.org
Assemblers generally convert one input instruction string to one output machine language bit pattern. They may have some higher level capabilities, such as macro expansion,but you can think of them as being simple "English" to "Machine" translators.

Compilers are the tool that translates a higher level language description, say 'C' or Fortran into machine language, so more often there is a one to many relationship between input string and output. Most compilers can output the relevant assembly language for the system, and that output may in-fact be fed into an assembler to make the machine code.

They are named differently because they do different things...
 
Yup.
 

Similar threads

Replies
6
Views
4K
  • · Replies 102 ·
4
Replies
102
Views
5K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 122 ·
5
Replies
122
Views
18K
Replies
59
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K