Revise Computingrevisecomputing.co.uk
Free student revisionSee questionsFor schoolsSchool enquiry
Free revisionSee questionsFor schoolsSchool enquiry
Knowledge/A Level/H446/01 Computer systems/Types of Programming Language/Modes of addressing memory

Modes of addressing memory: immediate, direct, indirect and indexed

Modes of addressing memory (immediate, direct, indirect and indexed)

1.2.4 Types of Programming Language

Practise exam questions

Types of Programming Language — Note 4 of 5

Candidates need an understanding of addressing, which should be integrated with assembly language. Candidates should have experience of using immediate, direct, indirect and indexed addressing in the writing, reading and tracing of programs written in assembly language.

What you need to know

The addressing mode tells the processor how to interpret the operand of an instruction: as the actual value to use, or as an address where the value (or another address) can be found.

What to know

  • Immediate is the fastest (no memory access for data); indirect is the slowest (two memory accesses).

Key terms

Immediate addressing

The operand IS the value to be used, e.g. ADD #5 adds the number 5.

Direct addressing

The operand is the ADDRESS of the memory location holding the value, e.g. ADD 5 adds the value stored at address 5. LMC uses direct addressing.

Indirect addressing

The operand is the address of a location that holds ANOTHER address, where the value is found. Useful for accessing more memory locations than the operand can address directly.

Indexed addressing

The address used is the operand PLUS the contents of the index register. Useful for stepping through arrays: increment the index register to move to the next element.

Exam technique

  • Tip:Work through addressing questions by writing down each memory lookup step by step.
  • Example:memory address 10 holds 20, and address 20 holds 35. LDA 10 with: immediate loads 10; direct loads 20; indirect loads 35. If the index register holds 10, indexed LDA 10 uses address 20 and loads 35.

Ready to test yourself?

Practise 1.2.4 questions
← Previous noteAssembly language and the Little Man Computer instruction set1.2.4 Types of Programming LanguageNext note →Object-oriented languages: classes, objects, methods, attributes, inheritance, encapsulation, polymorphism1.2.4 Types of Programming Language

Back to Types of Programming Language

Types of Programming Language

Note 4 of 5

  1. 1The need for and characteristics of a variety of programming paradigms
  2. 2Procedural languages
  3. 3Assembly language and the Little Man Computer instruction set
  4. 4Modes of addressing memory: immediate, direct, indirect and indexed
  5. 5Object-oriented languages: classes, objects, methods, attributes, inheritance, encapsulation, polymorphism
Topic overview