Section 4 Chapter 22 - Programming Language Translators Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Assembler

A

A program that translates assembly language into machine code

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

Names of the input and output of an assembler

A

Source code and object code

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

Compiler

A

A program that translates a high level language into machine code

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

Why different platforms need different compilers

A

Because the object code that is produced is hardware specific

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

Interpreter

A

A programming language translator that translates each line of source code into object code and executes it, one line at a time. However the interpreter may check for syntax errors in the entire source code before running

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

Bytecode

A

A type of code that is obtained by compiling a program. It is not machine code and is platform independent.

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

How bytecode is run

A

It is executed by a bytecode interpreter

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

Advantages of bytecode (2)

A
  • Platform independent

- Secure

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

Advantages of a compiler (4)

A
  • The object code can be saved and run without recompiling the source code
  • Object code executes faster than interpreted code
  • The object code can be distributed without the compiler being present
  • The object code is more secure as it is hard to understand
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Advantages of an interpreter (2)

A
  • It is useful for programming as there is no need for lengthy recompilation each time an error is found
  • It is easier to partially test and debug programs`
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where interpreters are useful

A

Debugging and developing a program

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

Where compilers are useful

A

For running a program fast

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