Translators Flashcards

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

High - Level Language

A

Computers need to translate it before they can read and run it.
Source code is easy for humans to understand
e.g. Python

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

Low - Level Language

A

Easy for computers to run
Tricky for humans to read and write

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

What does low - level language consist of?

A

Machine Code
Assembly Languages

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

Uses of high-level languages

A

One instruction of high - level code represents many instructions of machine code

Programmer can easily store data in data structures

Code is easy to understand, read, write

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

Uses of low-level languages

A

One instruction of assembly code represents one instruction of machine code

Code is difficult to understand, read, write

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

Machine code

A

Language that computer understands insructions in

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

2 types of translators

A

Compilers
Interpreters

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

What do compilers do:

A

Translate high - level code directly into machine code and create and executable file

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

What do interpreters do:

A

They take each instruction in the code and call machine code subroutines within their own code to carry out that instruction

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

Uses of a compiler:

A

Translates all the source code at the same time and creates one executable file

Only needed once to create the executable file

Returns a list of errors one compiling is complete

Once compiled the program runs quickly, but compiling takes a long time

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

Uses of an interpreter:

A

Translates + runs the source code one instruction at a time, does not create an executable file

Needed every time to run the program

WIll run the first error and stop - useful for debugging

Programs run slowly because code is being translated

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

What does the type of translator depend on?

A

The language being used

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