in CO and Architecture
1,201 views
2 votes
2 votes
Please clear my Doubt :-

Suppose i have a program segment and  address space of program segment is from 100 to 110(i.e. 100,101,102....)

Now if memory is byte addressable and 1 word is of 32 bit so 4 bytes are there :::

According to me in 1 word there is 4 byte so

one word contains 100,101,102,103

second word contains 104,105,106,107

and so on.....

Am I right ?

 

if memory is word addressable then

1 word = 100

2 word = 101

3rd word = 102

and so on...

 

Am i RIGHT IF WRONG PLEASE MAKE ME UNDERSTAND BY THIS ABOVE EXAMPLE..
in CO and Architecture
by
1.2k views

3 Comments

No it's not true each segment 100,101,102 will be of 4 byte each or 1 word each if system is word addressable
0
0
Sir i got it i have little bit of more doubt though if memory is word addressable then every word is of 1 byte so address is given to every word i.e. 100 for 1st word which is of 1 byte,101 for 2nd word which is of 1 byte and so on.

In byte addressable every instruction is of 4 byte i.e 1st word 100 which is of 4 byte ,2st word 101 which is also of 4 byte and so on like this ?

so when i write the next instruction after 100 is 4 bytes ahead i.e. 100 + 4 = 104 so it is the address of 1st byte of instruction at 101?

PLZ CLEAR ME OUT SIR?
0
0
Yes definitely because we store data in forms of bits and 8 bits make 1 byte

So when some one says system is byte addressable and 1 word is 4 byte means from memory we have to read 4 consecutive location of 1 byte each thus 100,101,102,103 make 1 word
2
2

Please log in or register to answer this question.