📜 ⬆️ ⬇️

KiB, Kib, KB, Kb

Here in this post comrade calls to follow the standards. Not everything is so simple with them, with standards. I want to show how complex the situation with the notation of units of information is. I will not explain the importance of the topic - who cares, please under the cat.

Background


A prime example of confusion with consoles is the "megabytes" of manufacturers of CD, DVD and floppy disks. It is equal to 1024x1000 bytes. The “1.44 MB” diskette actually has a capacity of 1.44 × 1024 × 1000 bytes = 1440 KB or 1.38 MB (where 1 MB = 1024 × 1024 bytes). And the capacity of single-sided single-layer DVD instead of 4.7 "GB" is 4.37 GB = 4.37 x 1024 x 1024 x 1024 bytes.

In 1998, the International Bureau of Weights and Measures stated that the SI prefixes refer only to powers of ten and should not be used to designate powers of two.

In 1999, IEC introduced the standard IEC 60027-2 with new attachments to indicate the amount of information. In 2008, a similar IEEE 1541 standard came out (the only difference is that IEC proposes to write “bit” completely instead of “b” for IEEE). The use of these consoles is approved by the International Committee of Weights and Measures. To designate the powers of two in the nearest SI prefix, the second syllable is replaced with “bi” from binary (binary): kibibyte - KiB, mebibyte - MiB, gibibyte - GiB.
')
GOST 8.417-2002, Appendix A: “In accordance with the international standard IEC 60027-2, the units“ bit ”and“ byte ”are used with SI prefixes” (capital letters K, M, G, ... designating degrees 10).

The standard also says: “Historically, such a situation has arisen that the name“ byte ”incorrectly (instead of 1000 = 10 3 , 1024 = 2 10 was taken) and the following prefixes were used (1Kbyte = 1024 bytes, 1Mbyte = 1024 KB, 1GB = 1024 MB, etc. In this designation, KB begin with an uppercase letter in contrast to the lowercase letter “k” to denote the multiplier 10 3. ”

On October 31, 2009, the Government of the Russian Federation approved the “Regulation on the units of quantities allowed for use in the Russian Federation”, which reads: “The name and designation of the information quantity unit“ byte ”(1 byte = 8 bits) are used with the Kilo binary prefixes Mega ”,“ Giga ”, which correspond to the factors“ 2 10 ”,“ 2 20 ”and“ 2 30 ”(1 Kbyte = 1024 bytes, 1 Mbyte = 1024 Kbytes, 1 Gbytes = 1024 Mbytes). These consoles are written with a capital letter. It is allowed to use the international designation of a unit of information with the prefixes "K", "M", "G" recommended by the International Standard of the International Electrotechnical Commission IEC 60027-2 (KB, MB, GB, Kbyte, Mbyte, Gbyte). "

Those. for bytes, the SI prefix now designates the powers of two, and for bits everything remains according to GOST - the SI prefixes indicate the power of 10.
1 MB = 1 MiB = 1024 Ă— 1024 bytes, 1 Mbit = 1 Mb = 1000 Ă— 1000 bits.

Summary table of consoles


IEEE 1541 / IEC 60027-2
GOST 8.417-2002, "Position ..."
kibibyte
Kib
1024 byte
kilobyte
Kb
1024 bytes
mebibyte
Mib
1024 KiB
megabyte
MB
1024 KB
gibibyte
Gib
1024 MiB
gigabyte
GB
1024 MB
tebibyte
TiB
1024 GiB
terabyte
Tb
1024 GB
kibibit
Kib
1024 bitThere are no approved designations for these values ​​in the RF
mebibit mibit
Mib
1024 Kib
gibibit gibit
Gib
1024 Mib
tebibit tibit
Tib
1024 gib
kilobyte
KB
1000 byte
megabyte
MB
1000 KB
gigabyte
GB
1000 MB
terabyte
Tb
1000 GB
kilobit
Kb
1000 bit
kilobit
Kb
1000 bits
megabit
Mb
1000 Kb
megabit
MB
1000 Kb
gigabit
Gb
1000 Mb
gigabit
GB
1000 MB
terabit
Tb
1000 Gb
terabit
TB
1000 GB


We see that the Government Decree of 2009 introduced designations for KiB, MiB, GiB, ... depriving the designations KB, MB, GB. This rearrangement does not solve the main problem: in Russia there are 2 times less approved designations for set-top boxes for units of information than in the international standard IEC 60027-2. Accepted designations do not cover all possible options. In addition, the prefixes similar in spelling and pronunciation (megabytes) denote different factors !!!

The unofficial practice mentioned in GOST covers all options: B - byte, b - bit, 1 KB = 1024 bytes, 1kB = 1000 bytes.

What to do?


There are different options. For example, copy the international standard. Or enter another 2 groups of consoles. Or legitimize informal practices (see above). Personally, I am inclined to the first option - I would not like our country (once very progressive in this regard) to join the ranks of lovers of local traditions in the form of yards / ounces / gallons (confusion when combined with the SI system has already caused serious accidents ).

Thank you malan for these errors.

Source: https://habr.com/ru/post/193256/


All Articles