Assembler
A program that translates assembly language into machine code
Names of the input and output of an assembler
Source code and object code
Compiler
A program that translates a high level language into machine code
Why different platforms need different compilers
Because the object code that is produced is hardware specific
Interpreter
A programming language translator that translates each line of source code into object code and executes it, one line at a time. However the interpreter may check for syntax errors in the entire source code before running
Bytecode
A type of code that is obtained by compiling a program. It is not machine code and is platform independent.
How bytecode is run
It is executed by a bytecode interpreter
Advantages of bytecode (2)
- Secure
Advantages of a compiler (4)
Advantages of an interpreter (2)
Where interpreters are useful
Debugging and developing a program
Where compilers are useful
For running a program fast