Viewing a single comment thread. View all comments

dimonium_anonimo t1_iy8wpb9 wrote

Every storage location needs an address, just like a house needs an address. In order to access that byte of info, you need to basically plug in the correct address. Of course, like all computers, they deal with electricity which is either on or off. We represent that with 1 or 0 respectively.

So let's say you've got a 2-bit address. The first bit has 2 options, and the second bit also has 2 options, so there are 2*2=4 addresses possible. Those are as follows:

00 - 01 - 10 - 11

If I increase the number of bits in the address by 1, to 3 bits, the first two bits can be any of those 4 while the new bit is 0, then repeat the same 4 options while the new bit is 1. So you double the number of locations that can be addressed for each bit you add:

(0)00 - (0)01 - (0)10 - (0)11

(1)00 - (1)01 - (1)10 - (1)11

If I clean that up a bit it looks like this:

000 - 001 - 010 - 011 - 100 - 101 - 110 - 111

8 options for 3 bits. 16 options for 4 bits. And so on... There's one other thing going on here. There are two prefixes that can be used for data. The normal metric prefixes (kilo-, mega-, giga-...) Are supposed to mean 1000 of the previous. A kilometer is 1000 meters. A megajoule is 1000 kilojoules. In data, they added a separate set of prefixes (kibi-, mebi-, gibi-...) Which are actually an even power of 2 multiple instead of 1000. It works out fairly well because 2¹⁰=1024 which is pretty close to 1000. So a kibibyte is fairly close to a kilobyte. And a megabyte is pretty close to a mebibyte.

I think what happened is that the common community of computer consumers didn't take to the new prefixes because it's a bit confusing to have two separate sets that mean different things. And it's not like you ever need to convert between kilobytes and megajoules so why not just use the regular prefixes anyway. So now everything is called kilobytes or megabytes when in reality, they actually mean kibibyte and mebibytes.

1