I was during a bit of brief reading on the memory cap that 32-bit OS's have and I came across the reason of: 2 ^ 32 = 4 294 967 296 ... or 4GB which makes complete sense apart from one part, why is it 2?
I thought a logical reason might be that a memory address is an integer value and the size of an integer value is 2, so I did a quick check using sizeof(int variable) and it came up as 4. Now I know (i think) that some compilers/platforms may give slightly different results to the size of variables, but this would mean that its 100% larger... which clearly means I am wrong.
A 32-bit number is made up of 32 binary digits. 32 bits can be grouped in 4 bytes*, which is what the sizeof operator gives.
A numerical representation of base b and length n can represent b^n values. For example, in base 10 and with 4 digits, you can represent 10^4 (10000) values. In base 2 and with 32 digits, you can represent 2^32 values. In this case, memory addresses.
*A byte isn't necessarily 8 bits long, but most are.
8 bits is an octet. A byte may or may not be 8 bits long. For example, there were CPUs with 12-bit bytes.
The size of a word is unrelated to the size of the byte, and it also depends on the CPU. http://en.wikipedia.org/wiki/Word_%28computing%29
A double word is the size of two words, and a quad word is the size of two double words, obviously.
1 GB == 1 GiB == 1024^3 B, unless you're a storage (HDDs, DVDs, probably Blu Ray) manufacturer, in which case 1 GB == 1000^3 B. Why do they do this? To put larger numbers on the box, obviously. The worst part is that many people aren't aware of this. I've seen complaints in online auction sites about the OS reporting a 500 GB HDD as having 465.66 GB (not counting file system structures, which are sometimes pretty large).
That really annoys me. I've had arguments with people who had always thought it was 1000. They act all smart like they know better than everyone else, or like the other person can't handle an extra 24 bytes, like it will confuse them. Ergo 1000 % 8 == 0, its still not right.
Or as you said, to put a bigger number on the box. I've also seen things like that, where the OS or some partitioning software, or something else has told them the real hard disk size and they don't know why its smaller.
As to octets and bytes and whatnot,
Yet again, I learn something new. Thanks :P
A word is only 16 bits on a 16bit machine. It's 32 bits on a 32 bit machine and 64 bits on a 64 bit machine.
You're assertions are based on macros created to port Windows across hardware platforms over time. They're Windows specific assertions and not generally true.
Fed up of errors and restrictions created for security that don't work and are pretty much redundant, while being annoying at the same time.
And judging from helios' post, which makes me realise that much of what I learned under windows was wrong, I'm probably better off.
I like many things about Linux systems. I like the Apt, I like the out-of-the-box capabilities, that you don't have to install it, that it isn't bloated and performs well, that it is modifiable and best of all it is open. I can download the kernel source if I want to.