2.5.1 - Languages Flashcards

1
Q

What is a high level language?

A

A language close to human syntax. Not specific to any hardware so can be translated for use on any other system. They have to be translated before they can be executed

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

Advantages of high level languages

A
  • Ease of use
  • Easy to understand
  • Easy to communicate with other programmers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantages of high level languages

A
  • Increased memory usage
  • Require more processing power
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Examples of high level languages

A

Python, C++, Java

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

What is source code?

A

The code for a program written in a high level language. This needs to be translated into machine code

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

What is a low level language

A

A language that is closer to machine code than human language.

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

What is machine code?

A

The binary instructions that a processor can understand, follow, and then execute

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

Advantages of writing in low level languages

A

Gives more flexibility for programmers to do what they want

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

Disadvantages of writing in low level languages

A
  • Hard to understand and write
  • This makes it harder to spot errors and debug
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is assembly language

A

A low level language that uses mnemonics and is closely related to machine code

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

What is object code

A

Code that can be understood by a processor (basically machine code)

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

Why are translators needed

A
  • They covert computer languages into machine code so the computer can understand it and run it
  • They can identify any errors during translation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Different types of translators

A

Compiler, Interpreter

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

Advantages of compilers

A
  • Translates the program in one go meaning the running of the program is subsequently faster
  • Translates the program in one go meaning errors can be spotted without needing to run the program
  • Produces an executable file that doesn’t need to be compiled again
  • No need for the compiler to be present when the object code is run
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Differences between high and low level programming languages

A
  • High level are easy to understand whilst low level are hard to understand
  • High level languages have to be translated before they can be run but low level languages often don’t need to be translated to be run
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Advantages of interpreters

A
  • Translates one line at a time so the exact line where the error is can be found
  • Require less available memory
17
Q

Disadvantages of interpreters

A
  • Run slower as each line needs to be translated before it can be run
  • The program has to be translated every time it is run
  • Source code program has to be supplied as they don’t produce an executable file. This could lead to unauthorised modification