Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
November 30th, 2010, 03:02 PM
 matthayzon89
Registered User

Join Date: Feb 2010
Posts: 9
Time spent in forums: 1 h 20 m 50 sec
Reputation Power: 0

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
November 30th, 2010, 05:18 PM
 E-Oreo
Lost in code

Join Date: Dec 2004
Posts: 8,233
Time spent in forums: 2 Months 2 Days 20 h 11 m 10 sec
Reputation Power: 7169

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.

__________________
PHP FAQ
How to program a basic, secure login system using PHP

Quote:
 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

Last edited by E-Oreo : November 30th, 2010 at 05:21 PM.

#3
November 30th, 2010, 05:36 PM
 matthayzon89
Registered User

Join Date: Feb 2010
Posts: 9
Time spent in forums: 1 h 20 m 50 sec
Reputation 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.

 Viewing: Dev Shed Forums > Computer Hardware > CPUs > Can someone please explain the difference between word and byte addressing?