Types of Program Translators Flashcards
What are the types of program translators
Assemblers, Compilers and Interpreters
How do assemblers work
Translated Assembly Language into Machine Code
Machine Code and Assembly Language have a 1-1 Relationship
Platform Specific
How do compilers work
Take high level program as their source code
Check for any errors
Translate the entire program at once
Platform specific
How do interpreters work
Translate high level languages into machine code line by line
Check for errors as they go - code line by line
Source Code and Interpreter must be present during translation - makes original code difficult to extract
What happens when some compilers don’t produce machine code straight away
They translate source code into an intermediate language
Intermediate language is often bytecode - allows for platform independence
What is Object Code
A translators output
What is Source Code
The input to a translator
What is a translator
A program that converts statements written in one language into another
Advantages of an interpreter
If an error is found the source code can be corrected
Easier to use when developing program as a program can sort out each problem as an interpreter comes across it
Advantages of a compiler
Runs faster than an interpreter
Machine code can be run on a computer without a compiler
Compiler program doesn’t have to be resident in memory at the same time as the program