23 July 2011

1000/1024

Have you ever bought a new computer, external hard drive or USB stick, plugged it in  and then been disappointed to find it appears to have considerably less storage than you were lead to believe?

There is an explaination for it and it lies in some kind of disagreement between the people who make the drives, and the people who make the software. A manufacturer will say 1kB = 1000 bytes, but the software says 1KB = 1024 bytes.

Neither are in fact wrong- 1000 being the traditional (decimal - powers of ten) usage of the kilo- prefix (1000metres in 1 kilometre etc.) and 1024 since it is the closest binary integer (power of 2)

Software companies like Microsoft chose to use 1024, hard drive manufacturers, Like WD chose 1000.


This never made a significant difference until drives grew in size and were measured in larger units. e.g. 1 megabyte = 1000/1024 kilobytes and so on...

A 128 megabyte flash drive would be made to have 128,000,000 bytes
When the drive is plugged in, the computer interprets 1024 bytes to be a kilobyte.
This equates to 125000 kilobytes. Dividing by 1024 again will give it in the megabytes.
This is roughly 122 megabytes by the computers interpretation.
The difference between the manufacturers quote and the software's quote is 6MB (4.6%)

This effect gets worse as the units get larger the company multiplies by 1000 another time, while the software divides by 1024.


  • For Gigabytes, a320GB hard drive I'm using shows up as 298GB. A difference of 22GB (6.9%)
  • For Terabytes , a 2TB hard drive is quoted by windows as 1.81TB. A difference of 185GB (9%)

    and if the same pattern were to stay, we could end up with 11.2% less petabytes than we'd postulated and would have trim 13.3% from our expectations of exabytes
If the offending hard drive is inside a new computer, this inconsistency might not be all that robs you of precious space. It's become the done thing to include service partitions alongside the usable part of the drive. In theory, this is a great idea (second only to actually getting a windows disc) so if things go to shit, you can bring up a recovery (mine is by pressing f8 at boot) and restore the computer to its factory settings.

My only complaint is that my laptop has 18GB reserved for this partition on a 320 (298)GB drive, and it's only half full! The drive is only ever accessed for recovery mode and its contents will never change, so that's a clear waste of 9GB that could be harbouring more porn!

Another set of units has been introduced - kibibytes, mibibytes, gibibytes etc. as seen on the right column of the table above. These are meant to remove confusion surrounding the 1000/1024 fiasco, but it looks unlikely to catch on. Until either side lets up, this disparity seems set to continue.

From what I gather, MacOS has adopted the manufacturers version of a megabytes and mostly uses these. When it does use binary bases, it uses the proper name - mibibyte etc.

...and I thought something that was intended to alleviate confusion, would simplify things. For the punchline, see yesterdays XKCD
Standards
:

3 comments:

  1. how exactly can you blame microsoft for this? they didn't define the size of a byte, they had nothing at all to do with it, infact, while these standards were being defined, microsoft didn't exist. nor did IBM's "personal computer" standard that we now take for granted. blame OEMs, blame public stupidity, but for fuck's sake, leave microsoft alone. and the free space on the recovery partition is for backing up your important documents and game save files when you do a factory restore. RTFM, FFS!

    ReplyDelete
  2. the decision not to use that space for porn is yours alone, don't blame the manufacturer, just move 9GB of your porn from C:\porn to D:\porn. there is literally nothing at all stopping you.

    ReplyDelete
  3. I just used microsoft as an example of the software side of things to save some boring explaination.
    I didn't really think their bumboy would pay me a visit

    ReplyDelete