Skip to main content

Basic Addressing Modes in a CPU

Lets discuss the addressing modes available in a CPU in simple.

(All the name used here are hypothetical)


  1. Immediate Addressing or literal Addressing.
  2.  Register Addressing.
  3. Direct Addressing.
  4. Indirect  Addressing.
  5. Indexed Addressing.

Immediate Addressing or literal Addressing.


eg: LOAD R1,#800.

            Here the Value 800 is loaded in to the Register "R1". 800 is a direct data represented using "#". It is neither register address nor memory address. 



Register Addressing.

eg: LOAD  R1 , R2.

Here both R1 and R2 are register addresses(imagine similar addresses of location in real world). From the above command what ever inside the register R2 is moved to R.


Direct Addressing.

eg: LOAD  R1 , VALUE .

The content inside the memory cell "VALUE" is loaded to register R1.
in the command itself the address of the memory location is given so that the content inside the memory location called "VALUE" is directly fetched. 


Indirect  Addressing


  1. Indirect Register Addressing.
  2. Indirect   Memory Addressing.

              Indirect Register Addressing.

             eg: LOAD  R1 , [R2].
             It is a memory location which is inside R2 so that content will be loaded to        R1. 

            Indirect   Memory Addressing.

           eg: LOAD  R1 , [VALUE].
           There is another memory location which is inside memory location "VALUE" so that content will be loaded to R1. 


Indexed Addressing.

eg: LOAD  R1 , VALUE ,[Ri].

"Ri" is this index register it contains an offset value, that value should be added with  the address of VALUE then the result will be again an address where the content of it should be searched and loaded into R1.




Fig 1:Indexed Addressing Graphical.









Comments

Popular posts from this blog

Jay Adelson: 2012 COM Convocation Speaker

Mark Zuckerberg's speech at Harvard Commencement 2017. "Find your purpose!" Live at Harvard Commencement. Live at Harvard Commencement. Posted by Mark Zuckerberg on Thursday, 25 May 2017