1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Feb 2010
Posts
9
Rep Power
0

#### Can someone please explain the difference between word and byte addressing?

This is the only question I got wrong on my last Comp Arch. Exam and I have still yet to understand it.

thank you!
2. No Profile Picture
Lost in code
Devshed Supreme Being (6500+ posts)

Join Date
Dec 2004
Posts
8,314
Rep Power
7171

Say your word size is 4 bytes and you want to determine which bit the address 2 points to. With word addressing, the third word (address 2) starts at bit 2*4*8 = 64 (word offset * bytes/word * bits/byte). With byte addressing, the third byte (address 2) starts at bit 2*8 = 16 (byte offset * bits/byte).

Note that with word addressing each address technically points to a distinct byte as well, but you can't address bytes that start in the middle of a word. So if my word size is 4 bytes and I use word addressing, it is impossible to directly address the 5th byte in memory (since the 5th byte is not on a word boundary (ie: byte 0, 4, 8, etc.)). To read the 5th byte, I would have to read the second word (address 1; bytes 4-7) and then extract the 2nd byte from that word.

With byte addressing it is possible to address multiple bytes within the same word.

If your word size equals 1 byte then word and byte addressing are identical. However, this is rarely the case. Word size is almost always greater than 1 byte. Word size is almost always an even multiple of bytes too.

Last edited by E-Oreo; November 30th, 2010 at 04:21 PM.
3. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Feb 2010
Posts
9
Rep Power
0
E-Oreo,
I would like to thank you very much for that explanation. I completely get a better idea of how it works now! Thank you!

I recently found out that a word refers to a addressable unit that is more than one byte in length and byte addressing refers to one byte at a time. But in my professors explanation it said that WORD addressing also uses byte addressing and that confused me a lot. I was planning on asking him what he meant by that, but now I understand.

Thanks again mate.