# Kilo vs Kibi, Mega vs Mibi

In computing, there's a abomination. kilo doesn't mean one thousand, it means 1024, and mega isn't a million, but 1048576. What the fsck?

Here's binary prefix.

name | base 2 exp | base 1024 exp | digits |
---|---|---|---|

kibi | 2^10 | 1024^1 | 1024 |

mibi | 2^20 | 1024^2 | 1048576 |

gibi | 2^30 | 1024^3 | 1073741824 |

Here's metric prefix.

name | base 10 exp | base 1000 exp | digits |
---|---|---|---|

kilo | 10^3 | 1000^1 | 1000 |

mega | 10^6 | 1000^2 | 1000000 |

giga | 10^9 | 1000^3 | 1000000000 |

Let the terms: kilo, mega, giga, be what they always meant universally, that is, powers of 10.

One source of consumer confusion is the difference in the way many operating systems display hard drive sizes, compared to the way hard drive manufacturers describe them. As noted previously, hard drives are described and sold using “GB” or “TB” in their SI meaning: one billion and one trillion bytes. Many current operating systems and other software however display hard drive and file sizes using “MB”, “GB” or other SI-looking prefixes in their “binary” meaning, just as they do for displays of RAM capacity. (This is fairly recent. The presentation of hard disk drive capacity by an operating system using “MB” in a binary sense appears no earlier than Macintosh Finder after 1984. Prior to that, on the systems that had a hard disk drive, capacity was presented in decimal digits with no prefix of any sort (e.g., MS/PC DOS CHKDSK command).)

from Binary prefix and Timeline of binary prefixes.

## Who Has Adopted Metric?

I am surprised to learn that the change actually has been adopted by a few. Quote:

2009. Apple Inc. uses the SI decimal definitions for capacity (e.g., 1 kilobyte = 1000 bytes) in the Mac OS X v10.6 operating system to conform with standards body recommendations and avoid conflict with hard drive manufacturers' specifications.[84][85]

2010. The Ubuntu operating system uses the IEC prefixes for base-2 numbers as of the 10.10 release.[86]

Way to go, Apple and Ubuntu.

When fixing this problem, there are 2 ways.

- ① Always use powers of 10, and abolish any UNNECESSARY binary notion, as Apple have done.
- ② Use proper binary prefix, as Ubuntu has done.

### What Notation to Use When Binary is Necessary?

I would go a step further and actually ban any binary prefix. When it is necessary to use binary based numbers, i think a elegant solution is to simply use exponent notation, for example, `2^8`

, `2^20`

, `2^30`

.

So, 3 kibi bits would be written as `3*2^10`

.