1.2k views

What is the intial pc value meaning

530=Pc + value

what should be the pc value

631 or 632 or 633 basically

the instruction length is not give so how can i determine the addr loaded in pc hen instructtion at 630 is executing because if instruction length is 4 bytes it should be 634

retagged | 1.2k views
+1

"the instruction length is not given"

So, you should ask this to the guy who made the question :)
For solving assume the instruction size is 2 bytes.

0
well it is given in stallings and the solution is given to be

assuming relative value=530-631

i am confused how did he make this assumtion

2 bytes wont be sufficent as 10 bit address field is in the instruction atleast we need 3 bytes

could you look at this question also are ask someone else its giving me sleepless nights

https://gateoverflow.in/986/gate2009_45
0
when the branch instr is executing,what is exactly the content of the PC?

630 or 620

Since the address part of the instruction is 10 bits, I assume instruction length is 16 bits = 2 bytes.

So, PC value during execution of branch instruction = 630 + 2 = 632 (PC always contains the next instruction address)

Now, branch is PC relative and the address to jump is 530, the operand will be 530 - 632 = -102 =  (10011010)2 (2's complement representation. )

answered by Veteran (408k points)
selected by
0
Sir , i noticed it now that next instruction should be $622$ instead of $632$ (from qstn)..right?
+1
why are we taking 630 ? In the question, its given 620
0
sourav u r right