Exam Board:
OCR A-Level
2.4 - Types of Programming
Language
Specification:
Computer Science H446
Watch on YouTube:
Programming Paradigms
Procedural Language
Assembly Language
Addressing Modes
Little Man Computer
Object-Oriented Language
Programming paradigms are different approaches to writing and structuring code to solve problems.
​
-
The procedural paradigm focuses on step-by-step instructions and the use of functions to organise tasks.
-
The assembly paradigm operates at a low level, giving direct control over hardware through processor-specific instructions.
-
The object-oriented paradigm models programs around objects that combine data (attributes) and behaviour (methods), promoting modular and reusable design.
Procedural Language
A procedural programming language organises code into reusable blocks (procedures or functions), which perform specific tasks in a step-by-step manner.
It focuses on a clear sequence of instructions that operate on data, often using variables, loops and conditionals. Examples include Python, C, Pascal and BASIC.
These languages are commonly used for software development, data processing and teaching programming fundamentals as they emphasise logical structure and modular design.

Assembly Language

Assembly language is a low-level programming language that uses short, readable codes called mnemonics to represent machine-level instructions executed by the CPU.
​
Each command in assembly corresponds closely to a specific hardware operation, making it highly efficient but difficult to write and maintain. It is mainly used for embedded systems, device drivers and performance-critical tasks where direct control of hardware is required.
For the OCR A-Level course, you must understand and be able to write code using the 11 mnemonics of Little Man Computer (LMC), which is an educational form of assembly language.
Modes of Addressing Memory

An addressing mode in assembly language defines how the CPU should locate the data (operand) needed for an instruction (opcode). It tells the processor whether the data is stored directly in the instruction, in memory, or needs to be calculated using an address or register. There are four main types:
​
-
Immediate addressing: The operand contains the actual data to be used, rather than a memory address.
-
Direct addressing: The operand contains the memory address where the required data is stored.
-
Indirect addressing: The operand contains an address that points to another memory location holding the actual data.
-
Indexed addressing: The operand provides a base address that is adjusted by the value in an index register to find the final memory address of the data.

Object-Oriented Language
An object-oriented programming (OOP) language organises code around objects, which combine data (attributes) and behaviour (methods) into reusable units.
Key features of OOP:
​
-
Classes are templates from which objects are created. Classes define both attributes (data) and methods (functions or behaviours).
-
Encapsulation allows data to be protected by making attributes private and providing controlled access through public methods.
-
Inheritance enables a class to reuse or extend the attributes and methods of a parent class, promoting the reuse of code.
-
Polymorphism allows methods or attributes to behave differently depending on the object or class that uses them.
Examples of OOP languages include Java, Python, C++ and C#. These languages are widely used for large-scale software development, game development and graphical user interfaces, where modularity and code reuse are crucial.
Questo's Key Terms
Programming Paradigms: procedural language, assembly language, object-oriented language
​​
Procedural Language: input, output, comments, variables, casting, count-controlled iteration, condition-controlled iteration, logical operators, selection, string handling, subroutines, arrays, files
​
Assembly Language: Little Man Computer, INP, OUT, LDA, STA, ADD, SUB, HLT, DAT, BRA, BRP, BRZ
​​
Modes of Addressing Memory: immediate, direct, indirect, indexed, index register, opcode, operand
​​
Object-Oriented Language: class, method, attribute, encapsulation, inheritance, polymorphism, instantiation, constructor method, get method, set method
Did You Know?
Python was named after the 1970s British comedy group 'Monty Python', not the snake. Guido van Rossum created Python in the late 1980s during his Christmas holidays as a 'hobby project'.

