6.2 Classification of programming languages Flashcards

1
Q

Explain the development of types of programming language?

A

the limited speed and memory of early computers forced programmers to write programs using low-level languages. They directly manipulated the processor but they required a lot of effort and were prone to errors. so they made high-level languages which were developed to allow for instructions to be communicated to a computers processor making the job easier.

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

What are the 2 types of low-level languages?

A

Machine code and assembly language.

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

Describe machine code?

A

Machine code only uses the binary digits 1 and 0 to represent instructions. Making programs very long and extremely difficult for humans to understand.

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

What are the advantages and disadvantages of machine code?

A

Machine code programs are prone to errors and difficult to debug.

However they directly manipulate a computers processor so it is a very powerful paradigm. There is no need to translate machine code before executing making it useful for embedded systems and real-time applications where speed is paramount.

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

Describe assembly language?

A

Assembly language was developed to simplify the process of writing programs. Mnemonics are used in place of binary instructions. Making the code more compact and less error prone. Each assembly language instruction has a 1-to-1 correlation to a machine code instruction.

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

Describe high-level languages?

A

High-level languages are not platform specific but they must be translated into machine code by a compiler or an interpreter before they can be executed. They use English instructions and mathematical symbols. This makes them easier for humans to learn and debug. High-level languages include imperative high-level languages which describe what a computer should do.

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

Compare Machine code to assembly language and high level languages (4 comparisons)

A

Both low-level languages are processor specific meaning they are not portable but high-level languages are portable.

Machine code is difficult for humans to read, assembly is slightly easier and high-level is east for humans to read.

Errors are hard to spot in machine code, a little easier in assembly language and fairly easy in high-level languages.

Machine code is directly executed buy processors whilst machine code must have an assembler but the 1-to-1 correlation means translation is quick. A compiler and interpreter must be used to translate source code into object code before it can be executed, making it more time consuming.

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