Translators: Interpreters, Compilers & Assemblers Flashcards

1
Q

What is a translator?

A

Any program that converts the source code into machine code.

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

What do assemblers do?

A

Convert low-level assembly language directly into machine code. Each line of assembly code is looked up by the assembler and directly translated into one line of binary equivalent machine code.

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

What is the problem with assembler code?

A

Processor specific and not portable.

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

What do compilers & interpreters do?

A

Convert high level languages into object code or machine code.

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

What type of relationship to compilers & interpreters have?

A

One to many, each line of high level source code translates to many lines of binary equivalent machine code.

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

What do interpreters do?

A

Take one line of high level code and convert it directly into machine code and then run it.

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

What are the advantages and disadvantages of interpreters?

A

Useful for debugging since the program will start running immediately and stop at the first line which contains an error.

Requires access to whole source code each time it needs to be translates it. Security issue and code runs slowly.

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

What do compilers do?

A

Takes the entire program and converts into object code, this can take a while.

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

What are the advantages and disadvantages of compilers?

A

The object code can be distributed to anyone with a compatible system and the original source code is not needed on each machine.

Object code runs a lot faster than interpreted code.

If program updated then original source code needs to be changed and re compiled and distributed.

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