levo

Fundamentals of Computer Organisation and Architecture

Addressing modes

  • 2 things to know
  • Paper 2

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.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

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

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A driver is .
softwarehardwarestorage

Blank Blitz makes facts automatic

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

AThe integer 5 is 0101.
B0.75 is 1/2 + 1/4.
CThe fraction bits are 1100.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

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

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

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.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

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