The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+3 votes

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 

thanks in advance

asked in CO & Architecture by (199 points)
retagged by | 799 views

"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. 

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
when the branch instr is executing,what is exactly the content of the PC?

630 or 620

1 Answer

+6 votes
Best answer

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 (342k points)
selected by
Sir , i noticed it now that next instruction should be $622$ instead of $632$ (from qstn)..right?
why are we taking 630 ? In the question, its given 620

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

35,499 questions
42,766 answers
42,151 users