Assemblers
A program which allows to convert low level language into machine code
Interpreter
Converts each line of the source code into machine code, and execute each line of the code as it run. Which is then executed by the cpu
Compiler
Converts source code into executable machine code
Explain the 4 main stage of compilation
Lexical analysis
removes unneeded comments and spaces
Creates a symbol table which holds the address of variables, labels and subroutines
Syntax analysis
The spelling and gramma of token are checked
If syntax error is found, error message is shown
Variable are checked to make sure it has properly declared
Code generation
Machine code is generated
Code is optimised
Code optismisation
been optismised to be fast, efficient and uses as little of the computer's resources as possible.
What is a translator
It translate a program written in one language to another language without changing the program
What is a syntax error
An error that occurs when the rules of the language have not been adhered to, found during translation.
What is a run time error
An unexpected error that stops the program from executing. E.g. A user inputting a string into a variable that is declared as an integter.
What is a logical error
An Error that doesn't stop a program executing but results in the wrong answer.
What is a linking error
An error that occurs when a program calls a function that is not correctly linked.
What is a rounding error
The difference between the original value and the value it is rounded to.
What is a truncating error
The difference between the original value and the value it is truncated to.