6.3 Types of Program Translator Flashcards

1
Q

What must a program be translated to before being executed?

A

machine code

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

What are the three types of program translators ?

A

assemblers, compilers and interpreters.

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

What is an assembler ?

A

translates assembly language into machine code

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

Why might different assembler’s exist ?

A

platform specific -must exist for each different type of processor instruction set.

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

What is a compiler ?

A

Translates programs written in high-level languages into machine code

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

What are the characteristics of compilers ?

A

-Check for any errors and then translate the entire program at once
-If the source code
contains an error, it will not be translated.
-Compilers produce machine code, they
are said to be platform specific.

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

Does a compiled program require other software to be present?

A

No once translated

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

What is an interpreter ?

A

Translates high-level languages into machine code line-by-line

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

What are the characteristics of Interpreters ?

A
  • Use procedures are used to translate each kind of program instruction.
    -Check for errors as they go
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What must happen when a program is translated by an interpreter and its result?

A
  • Both the program source code and the
    interpreter itself must be present
  • poor protection of the source code which make the original code difficult to extract.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do some Compiler’s do with source code ?

A

translate into an intermediate language like bytecode

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

What are the benefits of using an intermediary language in a compiler ?

A

-Use a virtual machine to execute bytecode on different processors.
-. Each different processor instruction set will have its own VM
-platform independence.

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

What is source code ?

A

Name given to the input to a translator

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

What is the object code ?

A

A translator’s output is called object code and is produced from source code.

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