The compiler and interpreter both translate the source code into machine code also known as the object code
Home
Index

Beginners
Internet Guide
Glossary

Experts
Programming

Recent news
Recent News
Archive

Tips & Tricks
Meta Tag Tips
Search Engines
Links

discussion
Forums

The compiler and interpreter

Both the compiler and interpreter convert the source code you write on your computer into machine code also known as the binary code. The source code is the instructions or statements you type into the computer. You can view the source code of this page by right hand mouse clicking the page then selecting 'view source' from the drop down menu options. There is a big difference between the compiler and interpreter. A compiler converts the whole program before it is executed where the interpreter reads the source code line by line or statement by statement. Each instruction is then dealt with before the next is read.

A compiler will always be faster than an interpreter allowing the program run quicker almost every time. A compiled program is only compiled once as it saves the machine code to disk. The machine code is a number of binary digits that make up a character or number. E.G. the binary code for the letter A is 01000001. o when the letter 'A' is typed, the digits 01000001 will be sent to the CPU. Software is usually produced in object code (machine code) , this stops anyone making modifications to the source code (may be written is any such language.)

An interpreter is more feasible for program development. The programmer has the advantage of debugging the program at a certain statement then continuing the translation of the program from that point. This saves possibly hours of time as the program does not have to be reloaded and recompiled. Usually a compiler will be more expensive then an interpreter.

Back to programming

Hosted by www.Geocities.ws

1