8.4 Translators And Facilities Of Languages Flashcards

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

In first computers, what were programs written in?

A

Machine code

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

Assembly language

A

More easy to write than machine code but it is processor specific and has to be translates into machine code before executed. Assembly language is a low level language

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

High level languages

A

Statements usually look like a bit of English or Maths. They also have data structures such as arrays and records.

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

How are high level languages translated?

A

A compiler or translater

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

Order of languages to components

A

High-level language -> Assembly language -> Machine code -> Hardware

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

High-level Advantages

A

Easier to learn, programs can be written faster, easier to understand and debug

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

Low-level advantages

A

Can run very quickly, uses less RAM, can be used to manipulate specific hardware componenets

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

Give a use for Low-level languages

A

Drivers

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

Compiler

A
  • Source code written by programmer
  • Translates the whole program to produce object code
  • Executes much faster as it is already in machine code
  • Can be saved in storage and run at any time
  • Compiler doesn’t need to be present at run time
  • Customers can’t see the code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Interpreter

A
  • Translates a high-level language into machine code one line at a time and immediately executes it
  • Take more time to be executed
  • Interpreter must be installed
  • Customers can see the source code
  • If it reaches a syntax error, it stops and displays an error message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Compiled examples

A

Java is compiled into an intermediate stage called bytecode, bytecode can be interpreted on many different types of processors using an interpreter

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

Interpreter examples

A

Javascript, used in webpages is interpreted; the source code is included in the webpage and then interpreted in the browser

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