Compilers and Interpreters

I think this is a hard bit of the course to understand (and explain) but here goes:

All high level language (HLL) programs need to be translated into machine code (aka 1’s and 0’s/binary). There are two forms of translators to make this happen; Compilers and Interpreters.

Compilers – These turn the whole HLL program into machine code in one go. This results in a file (object code) that can then be run on any computer system (is very portable) and runs very quickly (as it does not need to be translated again). Unfortunately if you have made a mistake (called a syntax error) in your program then it won’t run at all.

Interpreters – These turn the HLL program into binary each time you try and run it. An interpreter will go through each line of your program each time it translates it. This means that it is slow to translate your program.

Here are the Powerpoints below:

translators-1.jpgtranslators-2.jpgtranslators-3.jpg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: