Ad Banner Placeholder
Cambridge IGCSE Computer Science · 0478
Topic 4: Software — Part 2
Programming Languages, Translators & IDEs
Language levels and translation
Computers only execute machine code (binary), so humans use more readable languages that must be translated.
| Language Type | Description | Advantages | Disadvantages |
|---|---|---|---|
| High-level (HLL) | English-like (e.g. Python, C#). | Easy to read/write/debug; machine independent (portable). | Slower execution; must be translated into potentially less efficient code. |
| Low-level (LLL) | Close to machine code (e.g. assembly). | Faster/more efficient; allows direct manipulation of hardware. | Hard to read/write; not portable (specific to one processor type). |
- Assembly language
- A type of LLL using mnemonics. It has a 1:1 relationship with machine code.
- Assembler
- A platform-specific program that translates assembly into machine code.
Compilers and interpreters
High-level languages require translation using either a compiler or an interpreter.
| Feature | Compiler | Interpreter |
|---|---|---|
| Translation process | Translates the entire source code at once before execution. | Translates and executes the code line-by-line. |
| Error reporting | Checks whole code and provides a single error report at the end. | Stops execution immediately when an error is found. |
| Output | Produces a non-portable executable file. | No executable file produced; requires the interpreter to run. |
| Main use case | Used for the final program distribution. | Mostly used during development for easier debugging. |
Integrated Development Environments (IDEs)
An IDE provides a suite of tools in one place to speed up software development.
- Code editor: for writing code; includes syntax highlighting (colouring keywords) and line numbering.
- Run-time environment: allows the program to be run and tested within the IDE.
- Translators: built-in compilers or interpreters.
- Error diagnostics: identifies errors and provides location details to help with debugging.
- Auto-completion: suggests variable names or functions while typing.
- Auto-correction: fixes minor errors like missing brackets or typos.
- Prettyprint: automatically formats code with consistent indentation for readability.
0/15
Ad Banner Placeholder