Types of program Translators Flashcards

1
Q

What is Source Code?

A

Source code is the language instructions that have been written by the computer programmer. The computer cannot execute the source code directly

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

What is Object Code?

A

Object Code (or executable code) is translated from the source code using an assembler or compiler into instructions that can be executed by the computer

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

What is an assembler?

A

The source code is written in assembly language, which is a series of memorable mnemonics used to represent machine operational codes; assembly code is the most difficult language to program and needs a high degree of expertise to write and debug it.

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

What are the advantages of an assembler?

A

Advantage: it is an efficient low-level language that can be translated quickly as it has a one-to-one relationship with machine code.

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

What are the disadvantages of an assembler?

A

Disadvantage: it is complex to write and takes lots of programming time and expertise

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

What is an compiler?

A

The source code created by the programmer is not understandable by the computer. A software application called a compiler converts the source code to object code, which the computer can run. The object code is converted to match the target computer that will run the software.

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

What are the advantages of an assembler?

A

Advantage: an executable file is produced which runs without the need of the source code; this makes the source code more secure as it does not need to be distributed to the customer

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

What are the disadvantages of an assembler?

A

Disadvantages: compilation of a large program takes a long time to complete and any errors in the source code need to be corrected before an executable file can be produced; so, if there are any errors, it is necessary to correct them and recompile the source code.

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

What is intermediate language?

A

Some compilers create a final output in an intermediate language, such as bytecode; the output is designed to run on a virtual machine (VM) rather than on a central processing unit (CPU). This ensures that the compiled program is portable and not machine dependent when in VM format.

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

What is an bytecode interpreter?

A

A bytecode interpreter is used to translate the VM code into machine language for the target machine before the code is executed. Although the bytecode interpretation takes time, the final compiled program for the machine is more efficient than if the source code was compiled directly; this approach is used by Adobe Flash and Java.

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

What is an interpreter?

A

Interpreter software normally executes the source code directly, it is translated line by line; this avoids the need to compile the program.

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

Which ones runs more slower out of an compiler and interpreter?

A

Interpreted software runs more slowly than compiled software as each statement in the program is analysed before it is executed.

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

What is an advantage of an interpreter?

A

Advantage: during development the programmer might make frequent changes, which can be tested without going through the time-consuming process of compiling and linking for each change

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

What is an disadvantage of an interpreter?

A

Disadvantage: the interpreter needs to be loaded on the target computer, where it will create efficient machine code at runtime.
Additionally, the source code is available to the customer and the line-by-line translation method takes longer than a compiled program to run.

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