Lecture 3 Flashcards

1
Q

What 2 ways can translation be done?

A
– compilers, translating HLL instructions into
machine code (sequence of instructions)
– or, assemblers, translating mnemonic form of
machine instructions (like MOV, ADD, etc)
into their binary codes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are modules

A

Big programs usually are divided into

several separate parts or modules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are linkers

A
Each module has to be designed, coded and
compiled and then all resulting binary parts
are joined (linked) together by the linker
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Role of a compiler

A

Take a program and translate it as a whole into machine
code
– The processes of translation and execution are separate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Role of an intepreter

A

Take an instruction at a time, determine its function,
then carry out those actions
– The processes of translation and execution are
interlaced
– No binary is generated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Advantages of Compilers

A

Execution of compiled code is much faster than

interpretation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Advantages of Intepreters

A

• Interpreters are more suitable for rapid prototyping
and for other situations when a program is
frequently modified
• Interpretation can make it easier to move
programs between platforms
• Interpreters may be easier to write than compilers
• Interpreted code is easier to debug

How well did you know this?
1
Not at all
2
3
4
5
Perfectly