Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer languages (What is machine code (Disadvantages (Machine code is…
Computer languages
What is machine code
Machine code is the language that the computer understands
In machine code the instructions are made up of binary numbers
Advantages
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?
High level languages were developed as a result of machine code being so difficult to understand
A high level language will make use of English words and phrases.
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 and why is it required?
Before a high level language can be understood and run by a computer we need to translate it into machine code.
We can use two types of translator:
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.
Advantages
If errors are present, then they are highlighted immediately and are therefore easier to detect and fix.
Interpreters can run partial code or code under development.
Disadvantages
A translation is not saved, the interpreter must be present to run code.
If code is repeated, as in a loop, the code is translated and run many times.
Individual runs are slower because of the previous two points.
Compiler
A translation is not saved, the interpreter must be present to run code.