create your own

Meaning of Computer Interpreter and Compiler

70
rate or flag this page

By Chrysanthus


Introduction
In order for a programmer to write a program, he needs a computer and its operating system. He needs a text editor in which he writes the code. He also needs what is called an Interpreter or a Compiler. In this article I explain the meaning of Compiler and Interpreter from the point of view of a person who is not a programmer, but is computer literate.

The code
A programmer types a program in a text editor. A program just typed in a text editor, is coded text, understood mainly by programmers. If the ordinary person looks at the text, he would be able to identify a lot of words in the text, but he would not really understand what the whole text does. The coded text is the program code. It has certain strings and characters positioned in such a way that the ordinary man cannot understand. Learning programming implies, learning the meaning of such typed text. This code is the program. A program can also exist in what is known as the binary form (see below).

Source Code and Execution
Code of text as mentioned above, is called the source code. A program is meant to carry out a task like to add numbers together. When a program is carrying out its task, it is being executed; the program is said to be running. To “run” a program means to have it executed.

Interpreter
An interpreter is a kind of software. Software is a general name for programs and program data. A computer language is a particular set of rules used to write a program. A web page seen on the Internet has a source code. This source code is typed using the computer language called HTML. Programs like the one written in HTML can be run (results displayed) while they are in their source code form. You need what is called an Interpreter to this. The browser that displays a web page has the HTML interpreter.

Compiler
Many programs are not run in their source code (typed) form as opposed to the ones interpreted (see above). In this case the source code has to be converted into what is called the Binary. A binary is a form of the code, which is best handled by the computer hardware. Some software has to do the conversion from the source code into the binary. The software that does this conversion is called a compiler. An example of a computer language that needs a compiler for its program to become executable is called C++ (pronounced, si plus plus). An example of a compiler for this computer language is, BCC32. This compiler actually comes in a package called, Borland C++ Compiler 5.5. This package has other software associated with the actual compiler, BCC32.

Comparing Interpreters and Compilers
Code in the form of binary runs faster than code, which is not in the form of binary. That is compiled code runs faster the code interpreted. An interpreter interprets (change source code to machine code) as the program is running. A compiler compiles the source code to binary (machine code) and the binary is saved; the binary can be run afterwards.

Conclusion
After the programmer has typed his code, the code has to be interpreted or compiled in order to accomplish its task. An interpreter is special software. A compiler is also special software. An interpreter interprets the source code while the program is running, but a compiler compiles the source code into a binary, which is saved to be run later.

Chrys

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

No comments yet.

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working