Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Objective-C to retrieve some information about the hard drive. I successfully retrieve the amount used in bytes.

However I am having trouble converting bytes to gigabytes. When doing this programatically, I get 76,768,641,024 bytes. I then convert this to GB: 76,768,641,024 bytes/(1024* 1024 * 1024) = 71.5 GB. My Mac reports the exact same amount of bytes. However it reports that this is equal to 76.77 GB!

Why is there a difference in GB if the amount of bytes is the same?

I am on a iMac running OSX Snowleopard.

share|improve this question

The difference is in your measurement. OSX is using the STANDARD measuring system.

1 GB (GigaBytes) = 1000 MB (MegaBytes)

The non-standard measurement used, for example, in Windows is:

1 GiB (GibiBytes) = 1024 MiB (MibiBytes)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.