I right-clicked on a number, and iTerm2 shows me the number conversion in hex. But what is the 168.64 Ki number? What does Ki denote?

enter image description here


Short answer

Ki refers to the binary prefix kibi which denotes 210, or a value of 1,024. For more info refer to the Kibibyte article on Wikipedia.

Long answer

At first glance I thought this was referring to Kilobytes as in KB and not kB, because there’s an old convention since the 1970s that we use kB for 1,000 Bytes and KB for 1,024 Bytes.

So, what the iTerm2 conversion seemed to be doing was assuming that the 172,688 figure referred to bytes and therefore it was basically equivalent to 168.64 KB (i.e. 168.64 x 1,024).

However, upon reading the 'Kilobyte' article on Wikipedia and referring to the additional 'See also' articles, it appears that iTerm2 is using the symbol for Kibi (which itself is shortened for kilobinary, a term originally proposed in 1995 to denote a value of 1,024).

The International Electrotechnical Commission (IEC) after consultation with the Institute of Electrical and Electronic Engineers (IEEE) and the International Organization for Standardization (ISO) published a number of standards during the period 1999 to 2012. According to the BIPM standard JCGM 200:2012 "International vocabulary of metrology – Basic and general concepts and associated terms (VIM), 3rd edition"

SI prefixes refer strictly to powers of 10, and should not be used for powers of 2. For example, 1 kilobit should not be used to represent 1024 bits (210 bits), which is 1 kibibit.

The following table lists specific units, names, symbols etc:

enter image description here

Source: Wikipedia

So, while the value of a kibi (Ki) is 1,024, it is not necessarily representative of a Kilobyte (which represents 1,024 Bytes), because it can also refer to 1,024 of something else.

  • Ah so iTerm2 interprets my number as the number of bytes and outputs the KB number. For me, I think "KB" is more lucid than the "ki" iTerm2 uses... – flow2k Oct 29 '17 at 7:14
  • Ah, I just realized "Ki" is short for "kibi", a dimensionless prefix (so no need to assume the quantity is for byte) for 1024 of something, cf. en.wikipedia.org/wiki/Binary_prefix. (Kind of reminds me of the mole, as an off-topic aside.) – flow2k Oct 29 '17 at 7:25
  • 1
    Thanks for coming back and sharing. :) I've updated my answer for the benefit of others and also to provide more details. – Monomeeth Oct 29 '17 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .