Comment on Why a kilobyte is 1000 and not 1024 bytes

<- View Parent
wischi@programming.dev ⁨5⁩ ⁨months⁩ ago

I’m not sure if that’s your disk size or partition size but it’s not a power of two: www.wolframalpha.com/input?i=prime+factors+of+500…

The underlying chips certainly are exact powers of two but the drive size you get as a consumer is practically never an exact power of two, that’s why it doesn’t really make sense to divide by 1024.

The size you provided would be 500107862016 / 1024 / 1024 / 1024 = 465.76174163818359375 GiB

Dividend by 1000³ it would be 500.107862016 GB, so both numbers are not “pretty” and would’ve to be rounded. That’s why there is no benefit in using 1024 for storage devices, even SSDs.

The situation is a bit different with RAM. 16 “gig” modules are exactly 17179869184 bytes. www.wolframalpha.com/input?i=prime+factors+of+171…

So you could say 17.179869184 GB or 16 GiB. Note that those 16 GiB are not rounded and the exact number of bytes for that RAM module. So for memory like caches, RAM, etc. it definitely makes sense to use binary prefixes with 1024 conversation but for storage devices it wouldn’t make a difference because you’d have to round anyway.

source
Sort:hotnewtop