Which type of translator(s), which translates high-level
languages into machine code, best protects source
code? | Compilers |
What must first be done for a computer to be able to use intermediate languages? | Download the platform specific translator |
Whats the differences between an interpreter and a complier? | A comiler produces object code/ excutable file
An interpreture does not produce an object code
An interpreture analyses a program line by line whereas a compiler does the whole block of code
A compiler will not procuce an executable file if an error is found but an interpreture will run the code until the first error is detetced
Interpreted code will excute slower than excuting the object code produced by a complier
Do not need a compiler to excute a compiled program but when running interpreted code the interpreture always needs to be present
Once compiled source code is no longer needed to run the program but an interpreture always needs source code at runtime
Compiled code can only excute on a machine with the same processor type whereas interpreted code is more portable |
- Give the differences between source code and object code | Source code is written in high-level or assembly language whereas object code is written in machine language
+ all differences between high and low level languages, such as:
- Source code is easy to understand
- Source code is easy to modify
- Source code contains fewer statements than object code |
What type of translator can be used to
translate assembly language into
machine code? | Assemblers |
Which two types of translator can be used to
translate high-level languages into machine code? | Compilers
Interpreters |
Which type of translator translates
high-level languages into machine code
line-by-line? | Interpreters |
Why does the computer use translators? | In order for a program to be executed by a computer’s processor, it must be in the form of a machine code program |
What are the 3 types of translator called? | Interpreter
Assembler
Compiler |
Which type of translator translates high-level languages into machine code in one go? | Compilers |
Which type of translator requires the source code to be present when the program is executed? | Interpreters |
Which type of translator has procedures to translate
each kind of program instruction? | Interpreters |
What is source code? | Code written using a human-readable programming language |
What is object code? | Code written in machine langauage through translators |
What is an intermediate language? | 'Half way' standard language which can they be translated into computer specific machine code |
What is the benefit of using compilers with intermediate languages? | They allow the program to be run on all platforms |
How do compilers with intermediate languages work? | 1. Translate the program into the intermediate language
2. Platform specific translator translates this intermediate language code |
What is a compliler | A program that translates high level languages into machine code in one go |
What is an interpreter | A program that translates high level languages into machine code line by line |
What is an assembler | A program that comverts from low level programming code to machine code |
Explain how a compiler better protects source
code to an interpreture? | A copied file of the code is used to to run the program not the actual source code |