Save
...
AS level (y12 content)
3.6 Fundamentals of computer representation
Types of program translators
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Fauzia Habib
Visit profile
Cards (12)
What is an assembler
A program that translates a whole program {source code} written in
assembly code
and translates it into
machine code
{object code}
What is source code
Code that has not been
translated
into an executable format
What is object code
Translated code that is
executable
on any computer
What is an interpreter
A program that translates
high-level languages
by reding each statement in the
source code
and executing it immediately
What are the advantages of an interpreter (2)
Code is translated every time it is executed, so it can be run on computers with different processors
Can execute a section of the code, rather than the whole thing at once every single time
What are the disadvantages of an interepreter (3)
Takes time to execute, as each
statement
needs translating every single time it is
executed
Source
code
must be shared to
users
for them to execute code
Can only be translated and executed if the computer has the same
interpreter
installed
What is a
compiler
A program that translates
high-level languages
to
machine code
by translating all the code at once
What are the benefits of a compiler (3)
No need for
source code
once it has been compiled
Protects source-code as only
object code
needs to be shared with users
Whole code is already translated, making execution time short
What are the disadvantages of compilers
Takes ages to debug, as you have to translate the whole code every time you make a change to the source code
Object code will only run on a computer with the same
platform/processor
In what situation is it appropriate to use an interpreter
When a
program
is being developed
In what situation is it appropriate to use a compiler
When distributing a program to users, as it allows for fast
execution
, and
source code
protection
What is
bytecode
An
instruction set
used for programming that can be executed on any computer using a
virtual machine
that mimics the architecture of the computer