in CO and Architecture edited by
1,748 views
5 votes
5 votes

Here we will consider memory as word addressable or byte addressable?

in CO and Architecture edited by
1.7k views

1 Answer

10 votes
10 votes

When it is not mentioned that the addressing of memory cells in byte addressable or word addressable manner , then the default assumption is to take byte addressable , meaning that the word size of a memory cell to be taken = 1 byte

We know in PC relative addressing mode , PC value is updated as :

PC  (new value)    =     PC(current value) + Displacement(Given in address field of instruction)

So given current value of PC = 516 (As instruction is 4 bytes long and it is byte addressable) 

And given , new value of PC  =  885

Therefore , the displacement is found as  :

      516 + x  =  885

==>  x         =  369

2 Comments

i have one doubt in the fetch phase itself the pc will be increemented to pc+4 right?..now in the decode phase it will know whether it is branch instruction or not ....so we have to consider pc+4 as current right?
0
0
Yes fine that is what I m saying..Current value of PC will point to next sequential instruction address..

But in decode phase , there will be another adder to get the address of the branch ..The field mentioned in the address field of the instruction will be added to the current value of PC in the decode phase so as to point the next instruction which will not be a sequential instruction..
2
2

Related questions