#1
  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?


    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. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    In word addressing each address points to a distinct word; in byte addressing, each address points to a distinct byte.

    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.

    Using word addressing effectively gives you a greater address space. Using byte addressing with an 8-bit address gives you access to 2^8 bytes of memory. However, with word addressing and a word size of 4 bytes, an 8-bit address gives you access to 4*2^8 bytes of memory.
    Last edited by E-Oreo; November 30th, 2010 at 05:21 PM.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. 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.

IMN logo majestic logo threadwatch logo seochat tools logo