8

Why does my 500 GB hard disk show up to have exactly 500 107 862 016 Byte?

I'm aware of the GiB vs. GB issue and know that manufacturers of hard drives use 1000 as factor. But I cannot find an explanation for the weird looking number. It is not a power of 2, neither it seems to be any other simple product of numbers (factorization is 2^13 ⨉ 3^4 ⨉ 7 ⨉ 67 ⨉ 1607).

First I thought it is dependent on the manufacturer but than I checked a second drive and it has exactly the same amount of bytes (according to Mac OS X Disk Utility).

So what's the reason for this number?

bwDraco
  • 46,155
siegi
  • 307
  • 7
    Down votes seem unfair here. OP clearly researched, and isn't complaining, he's researched and is just trying to understand – Dave Feb 08 '16 at 21:10

2 Answers2

16

The answer is IDEMA formula, as described in the IDEMA Standard LBA 1-03 specification (specs available here, or direct PDF download).

LBA counts = (97,696,368) + (1,953,504 * (Advertised Capacity in GBytes – 50))
LBA counts = (97,696,368) + (1,953,504 * (500 – 50))
LBA counts = 976,773,168

Capacity in Bytes = 512 Bytes * LBA counts
Capacity in Bytes = 500,107,862,016 Bytes

Tom Yan
  • 9,643
  • 2
    Don't ask me how the formula is firstly formed though. It appears to be some black magic that the vendors never revealed its rationale. – Tom Yan Feb 09 '16 at 04:18
  • 2
    Welcome to Super User. People are security conscious and get concerned when clicking a link immediately downloads an unknown file. It's a good idea to include a notice on live download links. – fixer1234 Feb 09 '16 at 04:21
  • 3
    @fixer1234 It's quite common for hardware specs and datasheets to come as PDF, and often as download-only too. Anyway, I've cleaned up the 'warning' a bit. – Bob Feb 09 '16 at 04:32
  • Thank you, that explains it. So every complying hard drive will have the exact same amount of bytes. Would be interesting to know where the black magic came from, but we will probably never know ;-) – siegi Feb 09 '16 at 20:04
  • I'd have to add that even this is a little misleading. There's likely more bytes than this, due to having "spare" sectors for when the normally usable sectors go bad and have to be mapped. http://www.diskeng.com/hard-drive-bad-sector-mapping/ – computercarguy Jul 29 '19 at 20:09
  • 1
    After simplification it's Bytes = 1000194048*AdvertisedGB + 10838016. The difference between 1000194048 and 1e9 seems arbitrary, so does the offset 10838016 (which equals 10 MiB + 344 KiB); still in this representation the formula is not that insane. I wouldn't be surprised if it turned out the original formula was derived (a posteriori) from some existing HDD models of the era and designed to exactly match certain two of them. – Kamil Maciorowski Dec 15 '22 at 15:32
  • This does not seem to hold for large capacity drives over 10TB. Are there any newer specs? – Riobard Nov 02 '23 at 09:58
  • @Riobard probably the major vendors don't think a consistent exact capacity / lba count matters anymore. In that case probably only the vendors themselves know how each of them determines the values. – Tom Yan Nov 02 '23 at 11:03
0

You're right, it's not the GiB vs. GB issue.

If you check several 500GB drives, you'll find they're all* slightly different. In most cases, it won't be exactly 500 000 000 000 Bytes. Yours has 500 107 862 016 Bytes, another might be 500 107 946 218... That's the actual usable space the manufacturer ended up with given the precise disk layout and it varies slightly from drive to drive.

(*as far as I've seen)

  • 1
    The real question is why would anyone care so long as it meets the minimum size that it's sold as. –  Feb 08 '16 at 20:45
  • 2
    @Iain I don't think op does care, more about just understanding – Dave Feb 08 '16 at 21:14