answersLogoWhite

0


Best Answer

Assembler- A computer program that takes computer instructions and converts them into a pattern of bits that the computer can understand and perform by it certain operations.

Compiler- program that processes statements written in a programming language and turns them into machine language that a computer's processor uses. this program get the syntax error in the written program

Conceptually speaking, both an assembler and a compiler do exactly the same thing: they take as input some language that is human-understandable, and translate that directly into machine code instructions that the computer can execute.

However, in common usage, an "assembler" refers specifically to a such a program that takes as its input assembly language. Assembly language is a very "low-level" programming language, where short acronyms as used to represent machine instructions. Thus, assembly language very, very closely mirrors the actual machine code being executed, and (realistically) is only very mildly "human readable". Assemblers do little more than directly translate the assembly source code into machine code - that is, they don't do optimization of their own, as assembly language is meant as a direct representation of the machine code, and thus no optimization is required (or, desired).

A "compiler" generally refers to any other instance of this concept, but usually means something that take a "higher-level language" (i.e. anything above assembly language) and translates that to machine code. Compilers generally need to be significantly "smarter" than an assembler, as the compiler does a whole lot more work, and thus, has the opportunity to make significantly optimizations when doing the source->machine code translation. That is, high-level languages allow for the expression of concepts of ideas, which make them ideal for humans to write programs in. The compiler must be sophisticated enough to take these ideas and convert them into concrete machine code instructions. In addition, better compilers notice places where shortcuts can be taken (optimizations) given the overall structure of the input source code.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

6y ago

An Assembler converts Assembly instructions into executable machine language. A Compiler converts higher level programming language instructions into Assembly instructions, and then those are turned into executable machine language. Most Compilers allow generation of "object" code, which is the Assembly instruction set generated by the Compiler. Some older Compilers allow for the Assembly instructions to be fine tuned by the programmer. Compiled programming languages typically generate many lines of Assembly instructions for each program statement. Some programming languages, such as ANSI C, are very close to Assembly, while others such as Java, result in many Assembly instructions per program statement. Most Compilers are highly optimized and it would be difficult for a human programmer to improve the efficiency of the output. Assembly level instructions are very difficult for someone not trained on Assembly to read and comprehend.
: compiler is a system software which translates high level language into machine language all in one line of source program is treated as input and accessed on turn into machine language during which errors are encountered the entire program is error free it will be compiled and machine code will be generated. e.g.c++,java,c language. : Assembler is also a system software used to convert an assembly language program into machine language.e.g. T A S M (Turbo Assembler Software), A S M( Microsoft Assembler Software)

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

A disassembler reverts the process of an assembler: while an assembler translates assembly language source code into machine code, a disassembler reads machine code and generates the corresponding assembly language source code.

This is possible because assembly languages, unlike higher level languages, have a one-to-one relationship between assembly language instructions and machine code instructions. However, the disassembler's process is not perfect. Details such as names of functions and procedures, comments or visible grouping of code into distinct functions are generally lost.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

A compiler takes a text file written in a programming language, and converts it intobinary code that a processor can understand: it makes an ".exe" file. You compile only once, then always run the "exe" file.

Borland Turbo C is a compiler: you write in C in a text file, then you compile to get and exe file.

An interpreter does the same, BUT in real time: each time you run the code, it is "compiled", line by line: Basic is an interpreter.

An assembler is similar, in the way that, instead of taking a plain text file, ie in C, it takes a code written in Assembler Mnemonics, and convert it into binaries.

All "executable" files are in binaries (just 1's and 0's) - maybe viewed in hex (0x12de...)

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between assembler and compiler?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between an assembler and a translator?

what is the difference between an assembler and the translator


What is DML Compiler?

What is difference between Compiler and DML Compiler


Description on compiler and assembler with block diagram and figures?

Most of the compiler's that are used to compile programs is coded with the old assembler language. Assembler is also the older language which is used in the old Mainframe environment


What is the Difference between cross assembler and resident assembler?

An assembler which runs on a computer for which it produces object codes


The three Types of translator?

Assembler, Compiler and Interpretor


What is difference between assembler and linker?

There is no definite term "assembler" in compilation process. It is more like "compiler" and "linker". Assembler usually refers to a compiler of machine language: http://en.wikipedia.org/wiki/Assembly_language So you probably mean difference between compiler and linker? Lets say you have a 3 module program, and it uses a 3rd party library, then the compiler will just compile each of your modules (separately) into binary pieces, which have "unclosed" references to abovementioned library and other 2 modules. After u have 3 binary pieces comes in "linker" it attaches those "unclosed" (or unlinked) links to other modules and library, therefore giving you working program file (.exe file for example). Really hard to say that without a schema or something like that:) Hope this answer helped you.


Examples of computer language translators?

Assembler Interpreter Compiler


What is the difference between computer interpreter assembler?

wee2


What are the difference between a compiler design and a compiler?

In Compiler there is no design word ,whereas in compiler design there is design word


Similarities between compiler interpreter assembler?

Both are use to convert high level languages into machine language


What are types of system programs?

compiler linker loader macroprocessor assembler


What are the types of system program?

compiler linker loader macroprocessor assembler