levo

Fundamentals of Computer Organisation and Architecture

Addressing modes

  • 2 things to know
  • Paper 2
Start revising · £5/month

Overview

Recall questions on immediate against direct addressing, what ADD 20 does under each, their relative speed and flexibility, and why a loop counter needs direct addressing.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Process

Define direct addressing.

Evaluation

Compare immediate and direct addressing for flexibility, and say when each is appropriate.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    Which two addressing modes are used here, and what does an addressing mode mean?

    Model answer

    Immediate addressing and direct addressing. An addressing mode is the rule for how the operand of an instruction is to be interpreted, that is, how the processor works out from the operand bits where the actual datum it must use is to be found.

  2. 2

    Define immediate addressing.

    Model answer

    In immediate addressing the operand is the datum. The value written in the operand field is the actual value to be used, so the processor uses it directly without going to memory to look anything up.

  3. 3

    Define direct addressing.

    Model answer

    The operand field does not hold the value to be worked on; it holds the location at which that value is kept, so the processor must make a further access to go and collect the datum from there before it can use it. The location may be a main memory address or a register. Under this mode the instruction LDA 100 leaves the accumulator holding whatever is currently stored at address 100 — not the number 100 itself, which is what an immediate operand would have given.

  4. 4

    Take the instruction ADD 20. What does it do under each addressing mode?

    Model answer

    Under immediate addressing it adds the number 20 to the accumulator. Under direct addressing it fetches whatever is currently stored in memory location 20 and adds that to the accumulator; if location 20 happened to hold 3, it would add 3. The written instruction looks nearly identical, so the addressing mode entirely determines what the instruction means.

  5. 5

    How is immediate addressing usually written in assembly language, and why is the notation important?

    Model answer

    The operand is preceded by a hash symbol, as in ADD R1, R1, #20, whereas a direct operand is written as a plain address or a register name, as in LDR R1, 20. The notation matters because it is the only thing distinguishing 'the number twenty' from 'the contents of location twenty', and omitting the hash is one of the commonest mistakes in written answers.

  6. 6

    Compare immediate and direct addressing for speed.

    Model answer

    Immediate addressing is faster because the datum arrives inside the instruction itself, so the execute stage needs no memory access at all. Direct addressing requires an additional read: the operand must be placed in the memory address register and the value fetched over the buses into the memory buffer register before the operation can proceed, which costs extra clock cycles.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A driver is .
softwarehardwarestorage

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

Head means the first single element of a non-empty list.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Fundamentals of Computer Organisation and Architecture, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.