20.1 Programming Paradigms


2026 Syllabus Objectives

By the end of this subtopic, you should be able to:

  • Explain what a programming paradigm is
  • Describe the characteristics of the low-level programming paradigm, including the use of addressing modes: immediate, direct, indirect, indexed, and relative
  • Describe the characteristics of the imperative (procedural) programming paradigm, including the use of variables, constructs, procedures, and functions
  • Describe the characteristics of the object-oriented programming paradigm, including the associated terminology: objects, properties/attributes, methods, classes, inheritance, polymorphism, containment (aggregation), encapsulation, getters, setters, and instances
  • Describe the characteristics of the declarative programming paradigm, including the ability to write facts, rules, and queries to satisfy a goal

What is a Programming Paradigm?

A programming paradigm is a style or approach to writing programs. Think of it like a method of cooking — you can bake, fry, grill, or steam food. They are all ways of cooking, but each one has a completely different approach. Similarly, programming paradigms are different ways of thinking about and structuring a program.

Different paradigms suit different types of problems. Some problems are better solved by giving the computer step-by-step instructions. Others are better solved by describing objects in the real world. Still others are better solved by listing facts and asking questions.

Some programming languages only support one paradigm. Others — like Python and Java — support multiple paradigms at the same time, which is why they are called multi-paradigm languages.

There are four paradigms you need to know: low-level, imperative (procedural), object-oriented, and declarative.


20.1.1 Low-Level Programming

What Is It?

Low-level programming is the style of writing programs that are very close to the way the computer hardware actually works. Instead of using easy-to-read commands like print() or if, low-level programs use very basic instructions that directly control the processor (the brain of the computer), memory addresses, and registers.

Machine code is the lowest level — it is made entirely of 1s and 0s (binary). Assembly language is slightly higher — it uses short word-like codes called mnemonics (for example, LDD, ADD, STO) that are easier for humans to read, but still map directly to the processor's basic instruction set.

Low-level code is used when a program needs to interact directly with hardware. For example, writing a device driver (a program that lets the computer talk to a printer or a graphics card) often requires low-level programming, because you need precise control over memory and hardware.

One important characteristic of low-level programming is that it is processor-specific — a program written in assembly language for one type of processor (e.g., Intel x86) will not work on a different type (e.g., ARM). This means low-level code is not portable.

Addressing Modes

In assembly language, instructions often need to access data stored somewhere. An addressing mode tells the processor where to find that data. There are five addressing modes you need to know:

Sign in to view full notes