kB in KDiskFreeSpace and others

Jeff Mitchell kde-dev at emailgoeshere.com
Fri Mar 28 11:49:49 GMT 2008

On Friday 28 March 2008, Thiago Macieira wrote:
> Jeff Mitchell wrote:
> >KDiskFreeSpace remarks that it returns kB.  This means kilobyte, which,
> >although not necessarily in popular terminology, is technically defined
> > by SI as 1000 bytes.
> Well, no, it isn't. Byte isn't an SI unit, which means kB isn't defined as
> anything. By popular usage, it's 1024 bytes of 8-bits.

Byte isn't an SI unit, but the prefix "kilo" is, and they do explicitly have 
something to say about it:

"These SI prefixes refer strictly to powers of 10. They should not be used to 
indicate powers of 2 (for example, one kilobit represents 1000 bits and not 
1024 bits)."

IEEE, ISO, and IEC also prefer the 1000-byte definition.  From Wikipedia:

    * 1024 bytes (2^10): This definition is always used to express memory chip 
capacity, and other quantities which are based on powers of two. Most 
software also uses it to express storage capacity. This definition has been 
expressly forbidden by the SI standard ([1] section 3.1, marginal note), and, 
since 1998, most standards organizations instead recommend the term kibibyte 
(KiB). Although the word "kibibyte" is seldom seen in practice, it is 
starting to be adopted by some software, such as a few BitTorrent clients or 
the Linux kernel. [2] Yet, according to Google test, its usage is less than 

    * 1000 bytes (10^3): This definition is consistent with the SI prefix, and 
is recommended for all uses by international standards organizations such as 
IEC, IEEE, and ISO, with the abbreviation "kB". The overwhelming popularity 
of the 1024 definition for memory and file sizes means that anyone 
using "kilobyte" to mean 1000 in these situations is likely to cause 
confusion. However, it is common to use 1000 when deriving kilobyte measures 
from quantities which are not based on powers of two, such as bitrates.

Speaking particularly of the situation I encountered in Dolphin, Under normal 
circumstances I'd have looked at kB and thought "1024 bytes" and not given it 
a second glance.  But the value, which was returned as "kB" from 
KDiskFreeSpace, was being passed into a convertSizeFromKiB function.  That 
discrepancy between the two acronyms led to my confusion, even though the 
actual values were consistent.  The KDE docs should ideally be consistent in 
the acronyms in use.

> However, we're going towards the KiB acronym, for which there's no such 
> ambiguity. Whether anyone says "kibibyte" aloud remains to be seen 
> ("kays", "megs" and "gigs" are more common aloud).

Come on, you know you want to be heard saying "kibs", "mibs", and "gibs"  :-)

OK for me to change the documentation text, then?


More information about the kde-core-devel mailing list