Please enable JavaScript.
Coggle requires JavaScript to display documents.
High Level Languages and Translators (What is a High Level Language?…
High Level Languages and Translators
What is machine code?
Machine code is the language that the computer understands.
Advantage:
Machine code runs very quickly as it does not need to be translated
Disadvantages:
Machine code is very difficult for humans to read and understand
Processor specific – they can only run on the processor type they have been written on
What is a High Level Language?
A high level language will make use of English words and phrases
High level languages were developed as a result of machine code being so difficult to understand.
Advantages:
Contain English words and phrases so they are easier to read and understand
Easier to spot errors and bugs because they are easier to understand
Portable – the program can run on more than one type of processor
Disadvantages
They need to be translated into machine code so are slower to run
What is a translator
Before a high level language can be understood and run by a computer we need to translate it into machine code.
We can use 2 interpretors
What is an Interpreter
An interpreter does not produce object code (a stand alone piece of code).
The interpreter translates and executes each line of the program in turn.
Advnatages
.
Interpreters can run partial code or code under development
If errors are present, then they are highlighted immediately and are therefore easier to detect and fix.
What is a compiler
A compiler translates high level language instructions, called source code, into machine code or object code. It does this by going through the source one line at a time and translating it. It puts the translation into a file and then moves on.
Advantages
If no errors are found, then the source does not need to be translated again.
The translator program is no longer required once the program is translated.
Disadvnatges:
.
If any syntax errors are present then the program will not run.
The errors may be harder to correct, as the problems may not be identified until the code is translated