This topic explores the diverse landscape of programming languages, focusing on the characteristics of various paradigms and their practical application. I
Topic Synopsis
This topic explores the diverse landscape of programming languages, focusing on the characteristics of various paradigms and their practical application. It specifically covers procedural and object-oriented languages, alongside assembly language, including memory addressing modes and the use of the Little Man Computer (LMC) instruction set.
Key Concepts & Core Principles
- Low-level languages: Machine code (binary) and assembly language (mnemonics) – directly manipulate hardware, are machine-dependent, and offer high speed but low productivity.
- High-level languages: Procedural (e.g., Python, C), object-oriented (e.g., Java, C++), functional (e.g., Haskell), and declarative (e.g., SQL, Prolog) – abstract away hardware details, are machine-independent, and prioritise programmer productivity.
- Translators: Assemblers convert assembly to machine code; compilers translate entire high-level programs to machine code before execution; interpreters translate and execute line by line. Each has trade-offs in speed, debugging, and portability.
- Abstraction: The level of detail hidden from the programmer. Low-level languages have low abstraction (close to hardware), while high-level languages have high abstraction (closer to human logic).
- Generation of languages: First generation (machine code), second (assembly), third (procedural high-level), fourth (declarative/domain-specific), fifth (AI/logic-based).
Exam Tips & Revision Strategies
- Practice tracing LMC programs to understand how registers and memory are affected.
- Ensure familiarity with the provided pseudocode style for object-oriented programming.
- Be prepared to explain the benefits of different paradigms in specific contexts.
- Review the LMC instruction set table provided in the specification to ensure correct mnemonic usage.
Common Misconceptions & Mistakes to Avoid
- Confusing the different memory addressing modes.
- Misinterpreting the LMC instruction set or using incorrect mnemonics.
- Failing to distinguish between procedural and object-oriented programming paradigms.
- Incorrectly applying object-oriented concepts like inheritance or polymorphism in pseudocode.
Examiner Marking Points
- Ability to write and follow simple programs using the Little Man Computer (LMC) instruction set.
- Understanding of memory addressing modes: immediate, direct, indirect, and indexed.
- Knowledge of object-oriented programming concepts: classes, objects, methods, attributes, inheritance, encapsulation, and polymorphism.
- Identification of characteristics of different programming paradigms.
- Correct use of LMC mnemonics (e.g., ADD, SUB, STA, LDA, BRA, BRZ, BRP, INP, OUT, HLT, DAT).