Created by Thomas Barker
about 7 years ago
|
||
Question | Answer |
Translator | the purpose of a translator is to translate high level code into machine code which the computer can understand |
name the 3 types of translators | Compiler Interpreters assemblers |
source code | programming code which has not been compiled into an executable file.The programmer writes this |
object code | compiled code that can be run as an executable on any computer |
assembler | an assembler creates object code by translating combinations of mnemonic and syntax for operations. assembly language to machine code |
compiler | -A compiler translates the whole program as one complete unit. -it creates an executable file -it reports the amount of errors. -it does not need to present to run the code |
advantages of compiler | -It does not need to be present in order to run the code -Object code is saved -Object code executes faster than interpreted code -More secure |
disadvantages of compiler | -Get all errors at once which can make debugging longer -Different computers types need different compilers |
interpreter | An interpreter will translate each line of source code into machine language and then execute that machine code directly. Looks at each line at a time Likely to be used during program development |
advantages of interpreter | Get errors line by line you don't need to compile whole program to run sections of code As code is translated each time it is executed program code can be run on processors with different instruction set. |
disadvantages of interpreter | Interpreter required to run program which means source code must be distributed Slow as code needs translating each time. |
Bytecode | Bytecode is computer object code that is processed by a program, usually referred to as a virtual machine, rather than by the "real" computer machine, the hardware processor. |
Want to create your own Flashcards for free with GoConqr? Learn more.