The execution of a program can happen either natively -- the intructions are actual CPU instructions, or it can happen through an interpreter. The interprer thus takes instructions (which are typically not native CPU instructions), and performs the actions associated with the instruction (open a file, write a character to the screen, etc). The interpreter is thus in charge of the execution of the program instructions.
Now consider a program written in spoken English. It is obvious that the CPU does not understand spoken English. We can either use an interpreter to execute this program, or we can translate to "another form" (typically machine code specific to a particular CPU) -- using a compiler. This "other form" may require additional things to happen, so the compiler may insert extra instructions to cater for these things. The end result is our spoken English program, in another form -- either native, which can be executed by the CPU, or an a form which requires that an interpreter be used to execute it.
The interested reader is encouraged to read Allan Turing's groundbreaking paper on computing machines entitled "On computable numbers: With an application to the Entscheidungsproblem". You can find this easily by simply searching for this title with your favourite search engine.
Another AnswerWe usually prefer to write computer programs in languages we understand rather than in machine language, but the processor can only understand machine language. So we need a way of converting our instructions (source code) into machine language. This is done by an interpreter or a compiler.An interpreter reads the source code one instruction or line at a time, converts this line into machine code and executes it. The machine code is then discarded and the next line is read. The advantage of this is it's simple and you can interrupt it while it is running, change the program and either continue or start again. The disadvantage is that every line has to be translated every time it is executed, even if it is executed many times as the program runs. Because of this interpreters tend to be slow. Examples of interpreters are Basic on older home computers, and script interpreters such as JavaScript, and languages such as Lisp and Forth.
A compiler reads the whole source code and translates it into a complete machine code program to perform the required tasks which is output as a new file. This completely separates the source code from the executable file. The biggest advantage of this is that the translation is done once only and as a separate process. The program that is run is already translated into machine code so is much faster in execution. The disadvantage is that you cannot change the program without going back to the original source code, editing that and recompiling (though for a professional software developer this is more of an advantage because it stops source code being copied). Current examples of compilers are Visual Basic, C, C++, C#, Fortran, Cobol, Ada, Pascal and so on.
You will sometimes see reference to a third type of translation program: an assembler. This is like a compiler, but works at a much lower level, where one source code line usually translates directly into one machine code instruction. Assemblers are normally used only by people who want to squeeze the last bit of performance out of a processor by working at machine code level.
Compiler
A Compiler is a program that translates code of a programming language in machine code
*****Translated source code into machine code***** .
A compiler is a special program that processes statements written in a particular programming language and converts them into machine language, a "binary program" or "code," that a computer processor uses.
A compiler works with what are sometimes called 3GL and higher-level languages (3rd-generation languages, such as Java and C
Interpreter
Interpreters translate code one line at time, executing each line as it is "translated," much the way a foreign language interpreter would translate a book, by translating one line at a time. Interpreters do generate binary code, but that code is never compiled into one program entity.
Interpreters offer programmers some advantages that compilers do not. Interpreted languages are easier to learn than compiled languages, which is great for beginning programmers. An interpreter lets the programmer know immediately when and where problems exist in the code; compiled programs make the programmer wait until the program is complete.
Interpreters therefore can be easier to use and produce more immediate results; however the source code of an interpreted language cannot run without the interpreter.
Compilers produce better optimized code that generally run faster and compiled code is self sufficient and can be run on their intended platforms without the compiler present.
In Compiler there is no design word ,whereas in compiler design there is design word
cross compiler . hybird compiler . post compiler. ideal compiler. intelligence compiler.
It doesn't.
Apple provide the GCC (GNU Compiler Collection) compiler with their development tools which come free with the Mac OS X. Intel produce a version of their compiler for the Mac platform. For specific details see the links below.
They are different languages, each of them requires its own compiler.
What is difference between Compiler and DML Compiler
In Compiler there is no design word ,whereas in compiler design there is design word
Interpreater translate the high level language into machine level language line by line
Greetings Technologist. The Java compiler compiles Java code, whereas the C compiler compiles C Code HTH Richard Wolf Software Architect
Installing a compiler, not just the gcc compiler, is a process where you copy the various executable files to the installation directory, where you copy the various header files to the include directory, where you copy the various library files to the lib directory, in short, where you install the compiler program and configure it so that it can do its work, namely to compile programs. This is no different than installing any other program, such as the game Myst. Building a compiler, on the other hand, is the process where you use a compiler, or other tools, to compile a set of programs that represents the compiler. If this sounds circular, consider this... The game Myst is a program. You install it in order to play it. When you run it, you load and run the executable code that represents Myst. It also has source code, though you probably can not get a copy of that source code. You build Myst by compiling the source code into object code, and then linking an executable from that object code. Building a compiler is no different. It is a program. It has source code. You build it by compiling the source code into object code, and then linking an executable from that object code. When you do this to a compiler, however, you need to distinguish between the compiler that you are building and the compiler that you are using to build the compiler. Sometimes, the compiler is used to compile a new version of itself, in a different directory. Sometimes, a different compiler is used, such as using a simplified version of C to compile a C++ compiler.
It is easy to tell: there is no interpreter for C and C++, they are compiled languages.
Something that the compiler ignores.Comments are enclosed between /* and */.
cross compiler . hybird compiler . post compiler. ideal compiler. intelligence compiler.
A compiler is actually a program. However the function of a compiler it to take a programmers high level language code and render this as binary machine language instructions that a specific processor can execute.
It doesn't.
Apple provide the GCC (GNU Compiler Collection) compiler with their development tools which come free with the Mac OS X. Intel produce a version of their compiler for the Mac platform. For specific details see the links below.
They are different languages, each of them requires its own compiler.