Compiler and Interpreter

Topics: Programming language, Compiler, Computer program Pages: 4 (1182 words) Published: October 13, 2008
Definition of Compiler
Definition: A compiler is a computer program that transforms human readable source code of another computer program into the machine readable code that a CPU can execute. The act of transforming source code into machine code is called "compilation". This is the opposite to the process of interpretation. Definition of Machine Code

Definition: Machine code is the name for the Instructions that a CPU can execute. It's rather difficult to read as it is just numbers in memory. There are programs that can convert the numbers back into assembly language but unless you are pretty skilled or trying to break a protection scheme, there is little use or need for it.

Definition of Interpreter
Definition: In computing, an interpreter is a computer program that reads the source code of another computer program and executes that program. Because it is interpreted line by line, it is a much slower way of running a program than one that has been compiled but is easier for learners because the program can bestopped, modified and rerun without time-consuming compiles. Examples: The compiled program took ten minutes to run to completion. The interpreted program took an hour.

Definition of Source Code
Definition: Source code is the human readable instructions that a programmer writes. Here is an example of some C++ code void Rectangle::MoveTo (int newx, int newy)
{
x = newx;
y = newy;

About Compilers and Interpreters
Before the Java and C# programming languages appeared, computer programs were only compiled or interpreted. Languages like Assembly Language, C, C++, Fortran, Pascal were almost always compiled into machine code. Languages like Basic,VbScript and JavaScript were usually interpreted. So what is the difference between a compiled program and an Interpreted one? Compiling

To write a program takes these steps:
1.Edit the Program
2.Compile the program into Machine code files.
3.Link the Machine code files into a...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Compiler Essay
  • Essay on Compiler Construction
  • Compiler Essay
  • Essay on Structure of Compiler
  • Interpreter of Maladies Essay
  • Interpreter of Maladies Essay
  • Compiler Construction Essay
  • Compilers: Object-oriented Programming Language Essay

Become a StudyMode Member

Sign Up - It's Free