4.6 Fundamentals of Computer Systems (Classification of Programming Languages) Flashcards

1
Q

What are the 5 classes of programming languages

A

LOW LEVEL:
1G - Machine Code Language
2G - Assembly Language

HIGH LEVEL:
3G (Imperative) - Python, Java
4G (Declarative) - Database Orientated, SQL
5G - AI

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

What is meant by a low level language

A
  • A programming language with little to no abstraction from a processor’s internal instruction set, and can directly control the computer system hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is meant by a high level language

A
  • A programming language with a string absstraction from a processor’s internal instruction set, that is much more human-readable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is machine code

A

Lowest-level programming language that a computer’s CPU can execute directly. It consists of binary instructions (0s and 1s) that tell the hardware exactly what to do

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

What are the pros of machine code

A
  • No need for translation and so is faster to execute
  • It is more optimisable because there is more control ove the computer system hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the cons of machine code

A
  • Prone to error as one mistake in typing is easier to do
  • Harder to debug
  • Very time consuming to type 1s and 0s
  • not portable as machine code is processor specific
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Opcode and Operand

A
  • 2 parts of a low level language instruction
    Opcode: specifies what process the CPU should perform
    Operand: Specifies the set of values or the memory address that this operation should be excecuted on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is assembly language

A

Program written using a set of ‘mnemonics’ that represent the binary equivalent in machine code, and has a 1:1 correspondence with machine code language

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

What are the pros of assembly language

A
  • 1:1 correspondence with machine code meaning it is just as optimisable meaning its used usually in embedded systems.
  • Require less memory and excecutes faster than high level languages
  • mneumonics are easier to understand than binary
  • easier to program than machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the cons of assembly language

A
  • not portable as the program is processor specific
  • Code can still be difficult to understand
  • Can also be very time consuming
  • No inbuilt functions like HLL
  • Must be translated using an assembler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are The advantages of High level

A
  • easier understand code as the
    keywords are more like natural language.
  • They are portable.
  • They use a wide variety of inbuilt program structures to make the process of programming and debugging more straightforward and easier to maintain, therefore making development faster
  • There is a one-to-many mapping between a HLL statement to machine code often making development time quicker as the same program can be made in less line and so time in HLL language than in machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the disadvantages of high level Languages

A
  • Less optimisable
  • Must be translated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is meant by a imperative language

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

What is the link between imperative and low level languages

A

Programs in both are formed from instructions that specify how
the computer should complete a task

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

What does a Declerative Language entail

A

A language that provides a given intended result to the user without direct algorithmic instruction from the user of how to excecute it

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