The Gateway to Computer Science Excellence
+1 vote

Instructions are stored in memory. When they are to be executed they are brought into instruction register. Now it is divided as Mode, opcode, operand (log (memory size) is divided in three parts) . In direct addressing, operand represent the effective memory address. If bits in mode + opcode + operand (log mem size) > bits required to address a memory then how such a big instruction is stored in memory whose operand itself has those many bits?

in CO and Architecture by Active | 206 views
It's a disadvantage of direct addressing mode.
Suppose operand field consists of 16 bits then addresses $ from\ 0 \ to \ 2^{16}-1$ are only addressable using this mode that's why we go for other AM like register addressing, indirect addressing etc.
@soumya that means we consider memory is divided into blocks and when we try to store instruction in particular block of memory it cannot hold those many bits. So we can address fewer words in memory that actually present.


correct me if m wrong.
Not just the block address but the complete address is present in operand field.
And yes, we can address fewer words than actually present USING direct addressing mode provided that lesser bits are available than the required.

Suppose MM address or virtual address actually consists of 24 bits but you have 16 bits for operand and you want the content of location say $2^{22}$.
It won't be possible using direct addressing. What will you do then?
If you want to go for register indirect AM then you will store this 24-bit address in a 32-bit register and then give the name of that register in your instruction.
Thanx for the detailed explanation. :)

Please log in or register to answer this question.

Related questions

+1 vote
2 answers
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,215 questions
60,016 answers
94,703 users