Okay, so I don't know where to put this. It seems the CodeCall admins have done away with the hardware forum, and I don't know of any good forums for computer hardware outside of CodeCall. I know of CNet, but I also know that most of the people there are just purely pragmatically minded hardware enthusiasts or techies who obsess over the cache size and clock speed of the latest Intel or AMD CPUs and have probably never heard of such concepts as D flip-flops and RISC architectures. You know, the kind of people you meet in your A+ class. I don't know of a better place to ask a question about CPU architecture or implementation, so I'm posting this here.
I was reading The Art of Intel x86 Assembly Programming when I came across something that made me go "WTF?" Apparently 16-bit Intel CPUs address memory in 2-byte chunks and 32-bit Intel CPUs address memory in 4-byte chunks. Okay, that's not that weird. But here's where it starts to get really strange: Addresses on the address bus are always even for 16-bit CPUs and a multiple of 4 for 32-bit CPUs. Anyone who has even a fragmentary understanding of the binary number system knows that if a binary number is always even or a multiple of 4, then the lower-order bit or two bits are always zero. So one or two lines of the address bus are never used. Isn't that rather uneconomical?
The other weird part is how the CPU accesses data. 16-bit Intel CPUs divide memory into even and odd banks. The lower-order byte on the data bus has to come from the even bank and the higher-order byte on the data bus has to come from an odd bank. The book explains how if a 2-byte word is stored at an odd address, say 125, it takes two memory accesses - an access of 124 for the lower-order byte and an access of 126 for the higher-order byte. Of course, since the even half of the data bus holds the higher-order byte and the odd half holds the lower-order byte, it has to perform an extra operation to exchange them.
Nowhere does the book explain what happens when a one-byte value is stored at an even or odd address. Of course the CPU accesses the entire two-byte word that it's stored on, but how does it know which byte holds the value in question? And another thing: using this system, doesn't a byte value take up just as much memory as a word value? Why use bytes at all? You should just always use 16-bit values.
The addressing scheme for a 32-bit CPU is even more convoluted. Memory is divided into four banks: 0 mod 4, 1 mod 4, 2 mod 4, and 3 mod 4. You can imagine how ugly this gets.
Yes, I know that x86 is a convoluted CISC architecture, and it has many superfluous features that don't make sense because Intel tries to make it backwards-compatible with earlier CPUs. But that doesn't explain this. This is not a backwards-compatibility thing. This is a brand new feature that Intel introduced in their 16-bit CPUs.
What practical benefit does this have? The book doesn't explain this at all. It basically says "If you look at this diagram more closely, you can see there is a problem with storing a word at an odd address." It treats it like it's an inherent problem that any CPU will suffer from, that is unavoidable. The reality is it isn't. This is something that Intel chose to do. They didn't have to divide the memory this way, and frankly, they shouldn't have.
I am at a loss for words to describe how mind-bogglingly stupid and nonsensical and illogical this is, and also to express my frustration with such a reputed book for not providing a satisfactory explanation. I have only one question: Why?