6. Translation programs

Eventually every computer programming language has to be converted into Machine Code so that the computer can carry out instructions.

There are two ways of carrying out this translation.

1) One line at a time.

With this kind of computer program, the high level program is loaded and then each instruction is converted into Machine Code and then run one line at a time. This type of language is called an Interpreted Language.

It is the job of a program called the Interpreter to carry out this translation. BASIC is an interpreted language.

Advantage over a compiled language:
  • You can write one line of code and it can be immediately translated and run
Disadvantage over a compiled language
  • Slow to run, as every single line has to be translated as you work

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Interpreter

 

2) Translate all the instructions in one go

The idea behind this is to take the high level language computer program and translate it into compilermachine code in one go. All the translated machine code is stored in a file called the 'object code' file.

It is the job of the 'Compiler' to convert a high level language into Machine Code

Advantage:
  • It runs much faster than an interpreter because all the translation has been done before hand.
Disadvantage
  • Any changes to the program means that the whole thing has to be compiled once again

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Compiler

 

 

 

 

Copyright © www.teach-ict.com