Programming Languages and Translators
Generations of languages
| Generation | Level | Facts |
|---|---|---|
| 1GL | Machine language | Only 0s and 1s. The only language the CPU understands directly. Fastest, hardest. |
| 2GL | Assembly language | Uses mnemonics (ADD, MOV). Needs an assembler. |
| 3GL | High-level languages | English-like. C, C++, Java, Python, FORTRAN, COBOL, BASIC, Pascal. Needs a compiler or interpreter. |
| 4GL | Very high-level | SQL, report generators. You say what is needed, not how. |
| 5GL | AI-based | Prolog, Mercury. Problem solving by constraints. |
Language translators
| Translator | How it works |
|---|---|
| Assembler | Assembly language → machine code. |
| Compiler | Translates the whole program at once into object code. Shows all errors together. Program then runs fast. Example: C, C++, Java (to bytecode). |
| Interpreter | Translates and runs one line at a time. Stops at the first error. Easier to debug, slower to run. Example: Python, BASIC. |
| Linker | Joins object files and libraries into one executable. |
| Loader | Loads the executable into memory to run. |
Flow: Source code → (Compiler) → Object code → (Linker) → Executable file.
Types of errors
- Syntax error: breaks the rules of the language (missing semicolon). Caught at compile time.
- Logical error: program runs but gives a wrong answer. Hardest to find.
- Runtime error: occurs while running (divide by zero).
Object-Oriented Programming (OOP)
Languages: C++, Java, Python. Four pillars: Encapsulation (data and methods bound in a class), Abstraction (hide detail, show the essentials), Inheritance (a class gets features of another), Polymorphism (one name, many forms). A class is a blueprint; an object is an instance of it.
Who made what
| Language | Creator |
|---|---|
| FORTRAN (1957) | John Backus at IBM. First widely used high-level language. |
| COBOL | Business language. Grace Hopper played a key role. |
| BASIC | Kemeny and Kurtz |
| Pascal | Niklaus Wirth |
| C (1972) | Dennis Ritchie at Bell Labs |
| C++ | Bjarne Stroustrup |
| Java (1995) | James Gosling at Sun Microsystems |
| Python | Guido van Rossum |
Keep practising
Notes are only half the work. Test yourself with questions and discuss doubts with other aspirants.
Prepared for exam revision from standard computer textbooks, Microsoft documentation and official sources. Features differ between Excel and Word versions (2016, 2019, 2021, 365) so check which version your exam follows. Found a mistake? Tell us.