Translators And Languages (yr 11) Flashcards

1
Q

What is the difference between high-level and low-level languages?

A

High-level languages (e.g. Python) are easier for humans to read and write, using syntax similar to English.

Low-level languages (e.g. assembly) are closer to machine code and allow direct hardware manipulation.

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

What is the purpose of a compiler?

A

A compiler translates high-level source code into machine code in one go before the program is run. It produces an executable file and checks for all syntax errors at once.

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

What is the purpose of an interpreter?

A

An interpreter translates and runs code line-by-line. It stops when it encounters an error, making it easier to debug during development.

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

What is an assembler?

A

An assembler converts assembly language into machine code. It is used to program hardware at a low level.

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

State two advantages of using high-level languages.

A
  1. Easier and faster to write, understand, and maintain.
  2. Portable across different hardware systems.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

State two advantages of using low-level languages.

A
  1. Greater control over hardware.
  2. More efficient in terms of speed and memory usage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly