I'll answer your question as directly as possible since the usage KB vs. KiB vs. kB vs. kb will quickly spawn an off-topic debate as that naming convention war has been going on for decades now.
1.) What prefix standard Windows use in showing file size? (surely it's not IEC standard)
Actually it's the JEDEC 100B.01 standard which means that KB (Killobyte) is 1024 Bytes.
2.) Why Windows OS show size of files in KB (using a capital alphabet "K") when it's a small alphabet "k" for a Kilo in SI units.
Again, because it's the JEDEC 100B.01 standard for unit prefixes for semiconductor storage capacity; it's not an SI unit of measure and thus does not have the same meaning.
The lowercase k
can be synonymous with uppercase K
when dealing with kilo
/ kibi
; for giga
, mega
and tera
, JEDEC, ISO and BIPM SI prefix norms define them to be uppercase G
, M
and T
respectively. Lowercase g
, m
and t
are used only in informal situations, when context provides the meaning (as in I just swapped out my 1gb NIC or my 2tb hdd isn't working), and are per se invalid.
A capital "K" represents Kelvin in SI system of units. Am I missing something here in understanding?
Yes, a capital K
represents Kelvin
when you are specifically talking about measurements of temperature and dealing with SI units of measure, however, we are dealing with semiconductor storage capacity and I would not say I have 512 KB of RAM
and mean I have 512 Kelvin Bytes of RAM
. Further, it really depends on context to know when/how to differentiate between the IEC/JEDEC and SI units of measuring KB/MB/GB/etc.
Most OS's and the vast majority of devices that deal with memory/storage use the prefixes K
for Kilo to mean 1024 bytes, so when I get RAM that says it's a 4GB module, I know it's 4 Gibi-Bytes (4*1024*1024*1024) and not Giga-Bytes (4*1000*1000*1000).
The major exception to this is in drive capacities; when I purchase a thumb drive or hard drive, I know when it says 32GB, it means 32 Giga-Bytes (32*1000*1000*1000) and not Gibi-Bytes (32*1024*1024*1024), even though my OS will report it in Gibi-Bytes (and thus take my drive from 32GB to an effective 29.8 GiB drive). Also note that there are some flavors of Linux that like to use the KB to mean 1000 bytes, regardless of context, and this can get somewhat confusing as not all applications in the same OS will report the sizes the same. Most device makers will usually put a disclaimer somewhere on the "box" (or website etc.) to denote what they are meaning when they say KB/GB/etc, like on hard drive boxes that have the disclaimer of *1GB = 1000000000 bytes
.
If you're ever confused on what style your OS is reporting to you as, you can always look at how many bytes a file is and then do the math to see what your OS is telling you (the 'size of file', not 'size on disk' as those are different things); if your OS can't tell you the raw byte count, there are bigger issues beyond what suffix it's using.
Or as Randall put it:
1Why would you assume that SI conventions have to apply to non-SI units? The last time I checked, byte wasn't an SI unit, nor SI-derived. – Luaan – 2015-07-09T10:09:50.653
9@Luaan: SI conventions are the most common conventions by far for units, even for non-SI units. For example, they're trying to run the LHC at 13 TeV, but eV (electron volt) is not SI. When you say that the ambient noise level is 40 dB, the B (bel) is not SI either. – Dietrich Epp – 2015-07-09T11:46:56.063
2@DietrichEpp: That's still physics. The byte is not a unit of physics; physicists measure information as entropy (unit: J/K). – MSalters – 2015-07-09T12:58:32.397
3
Relevant: https://xkcd.com/394/
– basic6 – 2015-07-09T12:59:55.7333@MSalters: The "Bel" is not physics, it is an abstract unit like the byte. – Dietrich Epp – 2015-07-09T13:05:43.067
@DietrichEpp: As a physics engineer working in acoustics, I'm entirely familiar with the (deci)Bel. Audio is very much physics. ITYM that Bel is dimensionless, not abstract. That's hardly unique in physics. So it the mol, so are Cv (streamline) values, Reynolds numbers, ... – MSalters – 2015-07-09T13:45:01.747
2I do mean "abstract" in that the Bel does not correspond to any concrete (or physical) system. It is only used to express a ratio, not even a ratio of something in particular (like power). For example, in digital signal processing the dB will be used to express ratios of digital signals which have no physical units to begin with. So I strongly disagree with the notion that decibel is a "physical" unit, or connected to physics in any special way. – Dietrich Epp – 2015-07-09T14:08:35.180
1
K
meaning Kelvin isn't a possibility here, because there are no unit suffixes. The possibilities for interpretingKB
are:K
(prefix)B
(unit), orKB
(unit).kK
would be kilo-Kelvins. The non-standard upper-caseK
prefix is weird, but apparently allowed withB
for storage size, by JEDEC. (see @txtechhelp's answer). – Peter Cordes – 2015-07-10T07:17:40.707Answers, useful comments posted here, and this link really cleared up my confusion. KB (with a big k) does not exist.
– a.s. – 2015-07-10T09:26:55.9802Re the whole
K
thing: I own a graduated cylinder that measures liquid volume inmL
. A lowercasem
represents "meters" in the SI system of units. SomL
must mean "meter liters"?! What am I missing? – Quuxplusone – 2015-07-10T14:36:10.4431@Quuxplusone:The short forms for SI units (such as ml for milliliter) are symbols, not abbreviations.Here 'm' is a prefix for the metric unit 'Liter'. – a.s. – 2015-07-10T16:22:11.200
2@Luaan :No, the byte is not an SI unit. However SI states that the SI prefixes may be used with non-SI units, and that they should never be used to mean anything other than their SI meanings. – Jamie Hanrahan – 2015-07-11T05:02:08.233