4.6 Fundamentals of Computer Systems (Classification of Programming Languages) Flashcards
What are the 5 classes of programming languages
LOW LEVEL:
1G - Machine Code Language
2G - Assembly Language
HIGH LEVEL:
3G (Imperative) - Python, Java
4G (Declarative) - Database Orientated, SQL
5G - AI
What is meant by a low level language
- A programming language with little to no abstraction from a processor’s internal instruction set, and can directly control the computer system hardware
What is meant by a high level language
- A programming language with a string absstraction from a processor’s internal instruction set, that is much more human-readable.
What is machine code
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
What are the pros of machine code
- No need for translation and so is faster to execute
- It is more optimisable because there is more control ove the computer system hardware
What are the cons of machine code
- 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
What is Opcode and Operand
- 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
What is assembly language
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
What are the pros of assembly language
- 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
What are the cons of assembly language
- 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
What are The advantages of High level
- 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
What are the disadvantages of high level Languages
- Less optimisable
- Must be translated
What is meant by a imperative language
What is the link between imperative and low level languages
Programs in both are formed from instructions that specify how
the computer should complete a task
What does a Declerative Language entail
A language that provides a given intended result to the user without direct algorithmic instruction from the user of how to excecute it