The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+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
asked in CO and Architecture by Veteran (112k points) | 179 views
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

(https://gateoverflow.in/118291/gate2017-1-11)

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

1 Answer

+2 votes
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.
answered by Active (3.2k points)

Related questions

+4 votes
0 answers
6
asked Jan 11, 2018 in CO and Architecture by thepeeyoosh Active (1.9k points) | 590 views
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
49,811 questions
54,540 answers
188,429 comments
75,596 users