Programming Languages and Translators Flashcards

(17 cards)

1
Q

What is a programming language?

A

A formal language used to write instructions that a computer can understand and execute

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

What is a low-level programming language?

A

A language close to machine code and hardware-specific, e.g. assembly language

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

What is a high-level programming language?

A

A language closer to human language and easier to read and write, e.g. Python

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

Give one advantage of high-level languages

A

They are easier to understand, write, and debug

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

Give one disadvantage of high-level languages

A

They must be translated before they can be run

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

What is machine code?

A

Binary code (0s and 1s) that a CPU can directly execute

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

What is assembly language?

A

A language that uses mnemonics instead of binary and is processor-specific

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

What is a translator?

A

Software that converts source code into machine code

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

What is a compiler?

A

A translator that converts the whole program into machine code before execution

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

Give one advantage of a compiler

A

The program runs faster after it has been compiled

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

Give one disadvantage of a compiler

A

Errors are only shown after the whole program is translated

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

What is an interpreter?

A

A translator that converts and runs code line by line

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

Give one advantage of an interpreter

A

Errors are shown one line at a time

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

Give one disadvantage of an interpreter

A

Programs run slower because translation happens during execution

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

What is source code?

A

The original program written by a programmer

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

What is object code?

A

Machine code produced by a translator

17
Q

Which translator is used for assembly language?