The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
103 views
A PC-related mode branch instruction is $8$Byte long. The address of the instruction,in decimal, is $548321.$Find the branch target address if the signed displacement in the instruction is $-29?$
asked in CO and Architecture by Boss (41.5k points)
edited by | 103 views

1 Answer

+1 vote
PC points to the next instruction and not the instruction that it is executing. So when the instruction 548321 is executing the program counter will point to 548329 as the size of an instruction is 8 B. Since the displacement is -29, this will target to the instruction, 548300.
answered by (365 points)
edited by
0
answer is $548300$
0
Yes, sorry I mistyped, 548329-29 = 548300
0
edit the answer and please explain more, I'm not able to understand.
+3
I think it will be like this

address 548321

Now instruction size 8 byte

So, now pc pointing to 548321+8=548329

Here we are getting sign displacement-29

So, pc will point 548329-29=548300
+1

@

thank you so much, ma'am

Related questions

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,808 questions
54,481 answers
188,249 comments
74,521 users