Binary Notations

Are there any difference between kB (kilobyte), MB (megabyte), GB (gigabyte) and KiB (kibibyte), MiB (mebibyte), GiB (gibibyte)?

Yes of course, there are differences.

1 kB = 1000 bytes
Whereas, 1 KiB = 1024 bytes
1 MB = 1000 kB
Whereas, 1 MiB = 1024 KiB
1 GB = 1000 MB
Whereas, 1 GiB = 1024 MiB

Let me clarify this with another example.

1 kB = 1024 bytes (Wrong)
1 MB = 1024 kB (Wrong)
1 GB = 1024 MB (Wrong)
Similarly,
1 KiB = 1000 bytes (Wrong)
1 MiB = 1000 KiB (Wrong)
1 GiB = 1000 MiB (Wrong)

The correct values are:
1 kB = 1000 bytes (Correct)
1 MB = 1000 kB (Correct)
1 GB = 1000 MB (Correct)
Similarly,
1 KiB = 1024 bytes (Correct)
1 MiB = 1024 KiB (Correct)
1 GiB = 1024 MiB (Correct)

What all these means?
The traditional kilobyte, megabyte, gigabyte values (otherwise called as ‘SI prefixes’) are based on power of 10. Whereas, kibibyte, mebibyte, gibibyte values (otherwise called as ‘IEC binary prefixes’) are based on power of 2.

Digital storage manufacturers and most *nix (Unix-like) operating systems (generally) use the SI prefixes to report the values. Whereas, MS Windows uses the IEC binary prefixes to calculate the values but report the values in SI prefixes. In other words, MS Windows computes file size in mebibytes, but report the number as MB!

Now you know the reason behind the formatted capacity of HDDs, for example, 1 TB HDD, differs on a *nix system and MS Windows system.

On most *nix systems, the formatted capacity of a 1 TB HDD is generally reported as 1 TB (1,000,000,000,000 bytes). To compute this value, the system used SI prefixes.

On MS Windows, the formatted capacity of a 1 TB HDD is reported as 931 GB (953,674 MB). To compute this value, MS Windows used IEC binary prefixes. But as you can see, the system reported the calculated value in SI prefixes (GB) but not in IEC binary prefixes (GiB)!

In a similar way, consumer confusion also exists in kbit (kilobit), Mbit (megabit), Gbit (gigabit) and Kibit (kibibit), Mibit (mebibit), Gibit (gibibit) values. But that’s another story to tell!

Copyright: Text is licensed to Robin Mathew Rajan under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.