2.5.1 - Languages
Characteristics and Purposes of Different Levels of Programming Language
High-Level Languages:
Easier/quicker for humans to write
Easier/quicker to read/understand/remember
Easier/quicker to maintain/debug/spot errors because it is closer to English
Less code to write because one High-Level Language instruction represents many assembly instructions
Less memory efficient
Can be slower to execute if not optimised for the particular processor
Low-Level Languages:
- Code for the CPU to execute
- Not readily understandable by humans
- Binary instructions
- Specific to a particular computer/not portable to different systems
- Does not need to be translated before being executed
- Can be quicker to execute the instructions
- Memory efficient
- Requires the programmer to understand the processors structure
The Purpose of Translators:
The ^^processor^^ can only understand machine code.
The purpose of translators is to:
The Characteristics of a Compiler and an Interpreter:
Compiler:
- Converts high level code to machine code in one go
- Creates an executable file for the computer
- Used when the software is going to be distributed
- Users have no access to the source code so no-one can edit/steal/copy the code/program
- Used for error detection - errors are all reported after the code is compiled
Interpreter:
- Converts high level code to machine code line by line
- Used to test the program and find errors
- The program stops running when it finds and error and shows the location of the error when found
- It is quicker to re-interpret than to recompile
2.5.2 - The Integrated Development Environment (IDE)
- ^^Editors^^ - enables the code to be entered/edited
- ^^Error Diagnostics^^ - displays information about errors/location of errors and suggests solutions
- ^^Run-Time Environment^^ - enables the program to be run/tested and can check for runtime errors
- ^^Translators^^ - translated the high level code into machine code