+1 vote
179 views
Plz describe

Which addressing mode does this following line represents and how?

Index addressing mode, $X\left ( R_{1} \right )$, where $X$ is an offset represented in $2$'s complement $16$ bit representation
0
I did not understand the question correctly .But with whatever is given I can map it to Base register addressing ng mode. As. In indexed addressing mode we will add content of register R1 with Singed value of x. So register can be a base register and signed X is the displacement and it can work as base register addressing mode to jump from one location to another location during execution
0
why 2's complement 16 bit representation needed here?
+1
Because in control transfer instructions, my program can jump up or down means if my current PC value is 1000, then my next instruction in case of jump, can be before 1000 say 700 or it can be after 1000 say 1040.So based upon this my displacement from current location can be - 300 or +40.In case of c program if you use some goto statement and you jump to location that is defined before goto then displacement will be negative, if that location is after goto then displacement will be positive. So we need signed representation and for that we use 2's complementsl.
0
yes, but same thing can be done in index addressing mode too

how do u know , it is not index adderessing mode , and only displacement addressing mode?
0
Question is asking , we have an index addressing ,and which addressing mode functionality is implemented by this index addressing mode.Can you tell me source of question or options if any?
0

ya it is a gate question

but I feel confused, how these 2 line represents displacement mode

Rahul explain right,

X(R1):- Here register R1 hold some base address, and X contains displacement.

If you are currently executing say line 1000 and wants to jump at 750 and X will store that displacement in 2's complement forn.

+1 vote