Why is solid state memory capacity always a power of 2 Solut
Why is solid state memory capacity always a power of 2 ?
Solution
There is a good reason for RAM to come in sizes that are powers of two, because of the way it\'s made and the way it\'s addressed.
Say you have 4 GB RAM in one module. The addresses go from 0 through FFFFFFFF hex (which is 32 1\'s in a row). If you add another 4 GB module, that of course doubles the amount you have. Since each binary digit represents multiplication by 2 (just like each decimal digit represents multiplication by 10) the maximum address is now simply 1FFFFFFFF. Your memory controller could handle this by sending addresses 0 through FFFFFFFF to the first module, and 100000000 through 1FFFFFFFF to the second module. (Actually it is not quite that straightforward, but that\'s the idea.) It works the same way within the RAM modules, as the chips carry more and more capacity. It is very convenient for all of the RAM in the system to be easily combinable into a single contiguous block of addresses, and this is easiest at the hardware level if the modules come sized in powers of two.
There is no corresponding reason for a hard drive to have a number of sectors that is related to a power of 2. The number of recordable surfaces, the number of sectors per track, and the number of tracks per surface are not binary-based; they are simply \"whatever fits.\" (17 sectors per track was a common figure in the early PC hard drives.) In modern hard drives the number of sectors per track is not even the same from the outermost tracks to the innermost.
So, the hard drive has no internal reason to come in powers-of-1024 capacities. As for addressing across multiple drives, because of the way volumes and file systems work, it is simply unnecessary to aggregate all of the disk storage in a system into one array of blocks with a contiguous set of block addresses. And even if it were desirable, the software in the storage driver stack in the OS would not have any trouble keeping track of \"blocks 0 through 3906259999 are on drive 0, 3906260000 through whatever are on drive 1,\" etc. In fact there are many storage software systems that do that now (both dynamic disks and storage spaces in Windows, for ex.), to make a single \"volume\" out of a collection of disk drives with arbitrary sizes.
