YEAR 2 CO1 WEEK 2 MEMORY ADDRESS MODES Flashcards
What are memory addresses used for?
They are different ways of referring to the unique addresses for every location of memory.
Describe Immediate Adressing.
Means the data to be used is hard coded into the instruction itself.
Fastest method of addressing as does not involve main memory at all.
Describe Direct (or Absolute) Addressing.
Very simple way of addressing memory - means code refers directly to location in memory.
State pros and cons of Direct Addressing.
Bad thing depends on the correct data always being present at same location.
Describe Indirect Addressing.
Means addresses stored in a table in memory (often lookup table).
Operand acts as pointer telling CPU where to look for addresses within the table then using these to find the data needed.
State pros and cons to Indirect Addressing.
Slower than Direct as CPU to look up two things.
Describe Indexed Addressing.
Means the final address for the data is calculated by adding an offset to a base address.
Very often data stored as a chunk in memory being contiguous.
The array has ‘base address’ which the location of the first element then an ‘index’ is used that adds an offset to the base address in order to fetch any other element within the array.