Question: Why do hard disk drives sizes come in multiples of 100, while flash memory drives sizes are generally multiples of 2?

Every HDD I saw had a capacity that was something like 100GB, 250GB, 500GB, 2000GB – numbers that ended with zeros.

but flash-memory based devices nearly always had sizes as multiples of 2, like 64GB, 128GB

Only recently did I see some SSDs coming in 120GB or 200GB sizes.

Is there a reason for this? I have always wondered why but never had a chance to find out.

Answer: 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. (I know, you asked about flash drives. Please bear with me.) It’s addressed via binary numbers that appear on a bus that comes out of the CPU, and all RAM modules are wired up to all bits in the bus.

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.

Now before explaining the sizing of flash memory, we have to make sure we’re clear on one more detail about the sizing of RAM and of hard drives:

You probably know that RAM sizes have nearly always been quoted using “binary prefixes”, meaning that e.g. “4 GB RAM” means 4 times 2 to the 30th – or, more conveniently, 4 times 1024 to the 3rd power, i.e. 4 x 1024 x 1024 x 1024 = 4,294,967,296. But when you buy a hard drive, the “GB” means 1,000,000,000 bytes.

By the way, this was not a recent change by hard drive makers to try to sell us less capacity at higher cost. Hard drives have ALWAYS been quoted this way; hard drives were using “decimal megabytes” before RAM even came sized in megabytes, and same for giga and tera. The very first hard drive, the IBM 350 RAMAC, had a capacity of 5,000,000 characters, stored on fifty platters. See, it’s tough to have pure powers of two when you have prime factors like “5” in the mix. But that aside…

The joker in this deck is solid state drives, including things like USB “keys”, SD cards, etc.: yes, the “number before the unit” is often a small power of two, like 64. But the “G” means 1,000,000,000, just like it does on a hard drive.

If you don’t believe this, plug one into your computer and get it to tell you how many bytes are on the drive, without prefixes. If your “64 GB” flash drive was really 64 binary gigabytes the number would be 68,719,476,736 (and Windows would show it as “64 GB”). But the manufacturer’s fine print will say “1 GB = 1 billion bytes” or some such, so it’s really only 64,000,000,000 guaranteed, and Windows will say it is 59.6 GB (because Windows uses binary prefixes for hard drives, even though it shouldn’t). But, really, the 59.6 GB is correct if you remember that “G” there means 1024 cubed, or 1,073,741,824.

Now, the strange thing: Where is the extra capacity? See, the flash RAM chips inside the USB keys and the mSATA devices all come in “binary sizes”. So in a “64 GB” flash drive there is likely “64 GiB” (binary gigabytes) of actual flash RAM. But you only get to use 64,000,000,000 bytes. Where’s the rest? Well, flash memory needs a lot of spare space to work in. The “64 GB” flash drive uses the difference between 68,719,476,736 and 64,000,000,000 as spare space.

Yes, recent flash drives, especially the HD substitutes, are showing up in hard drive-like sizes. I I imagine they are using the extra for more spare space, which increases their lifetime. e.g. the “120 GB” flash drive provides 120,000,000,000 bytes to the user, but the capacity of the chips is likely 137,438,953,472 bytes. That’s a lot more spare space than if the drive exposed 128,000,000,000 to the user.