<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="new">
  <name>Prefixes for binary multiples</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2005/10/16 15:36:26.953 GMT-5</md:created>
  <md:revised>2005/10/21 22:51:19.277 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="rsimpson">
      <md:firstname>Rick</md:firstname>
      
      <md:surname>Simpson</md:surname>
      <md:email>rsimpson@alumni.rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="rsimpson">
      <md:firstname>Rick</md:firstname>
      
      <md:surname>Simpson</md:surname>
      <md:email>rsimpson@alumni.rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>binary prefixes</md:keyword>
    <md:keyword>exbi</md:keyword>
    <md:keyword>gibi</md:keyword>
    <md:keyword>kibi</md:keyword>
    <md:keyword>mebi</md:keyword>
    <md:keyword>pebi</md:keyword>
    <md:keyword>SI prefixes</md:keyword>
    <md:keyword>tebi</md:keyword>
  </md:keywordlist>

  <md:abstract>The SI ("metric") prefixes, such as "k" for 1000 and "M" for 1,000,000, have been used for years to express binary quantities such as memory size. However, there are a separate set of prefixes for binary multiples that are intended for this use and are more precise.</md:abstract>
</metadata>
<content>
<section id="section1">
<name>Prefixes</name>
<para id="prefixes"> 
Almost all digital computers these days are <emphasis>binary</emphasis>, meaning that they deal with numbers expressed in binary rather than decimal.
This means that memory addresses, and thus memory sizes, are also expressed in binary.
Memory sizes are almost always nice, round numbers in binary, but not in decimal. 
Thus a computer with a 16-bit wide address can have up to 
<m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>16</m:mn></m:msup></m:mrow></m:math>
bytes of memory, which is 10,000,000,000,000,000 in binary and 65,536 in decimal.</para><para id="element-247">Early on it was observed that 
<m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>10</m:mn></m:msup></m:mrow></m:math>,
which is 10,000,000,000 in binary, is 1024 in decimal. 
This isn't too far off from 1000 ("only" 2.4% off).
Not only that, but 
<m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>20</m:mn></m:msup></m:mrow></m:math>
is close to a million, being equal to 1,048,576 in decimal.
It became common to refer to "kilobytes" and "megabytes", where a "kilobyte" was really 1024 bytes and a "megabyte" was really 1,048,576 bytes.</para><para id="element-883">To those in scientific and technical disciplines other than computer science and computer engineering, though, "kilo" means 1000 and "mega" means 1,000,000.
They don't mean <emphasis>about</emphasis> 1000 or <emphasis>approximately</emphasis> 1,000,000.
Properly, all the 
<link src="http://physics.nist.gov/cuu/Units/prefixes.html">SI prefixes</link> 
such as "kilo" and "mega" refer to powers of 10, not powers of 2.
</para><para id="element-718">Lately the disparity caused by using power-of-ten names for power-of-two quantities has gotten worse because the numbers have gotten bigger.
We now have even laptop computers with "gigabytes" of memory, and large server computers can have "terabytes" of disk space.</para><para id="element-103"><figure id="how-bad-is-it-fig">
<name>How far off are we?</name>
<table id="how-bad-is-it-table" frame="all">
  <tgroup cols="3" colsep="3" rowsep="1">
    <thead>
      <row>
        <entry>When we say</entry>
        <entry>but mean</entry>
        <entry>we're this far off</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry align="left">1 kilobyte</entry>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>10</m:mn>
          </m:msup></m:mrow></m:math> bytes
        </entry>
        <entry align="right">2.4%</entry>
      </row>
      <row>
        <entry align="left">1 megabyte</entry>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>20</m:mn>
          </m:msup></m:mrow></m:math> bytes
        </entry>
        <entry align="right">4.9%</entry>
      </row>
      <row>
        <entry align="left">1 gigabyte</entry>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>30</m:mn>
          </m:msup></m:mrow></m:math> bytes
        </entry>
        <entry align="right">7.4%</entry>
      </row>
      <row>
        <entry align="left">1 terabyte</entry>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>40</m:mn>
          </m:msup></m:mrow></m:math> bytes
        </entry>
        <entry align="right">10.0%</entry>
      </row>
      <row>
        <entry align="left">1 petabyte</entry>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>50</m:mn>
          </m:msup></m:mrow></m:math> bytes
        </entry>
        <entry align="right">12.6%</entry>
      </row>
      <row>
        <entry align="left">1 exabyte</entry>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>60</m:mn>
          </m:msup></m:mrow></m:math> bytes
        </entry>
        <entry align="right">15.3%</entry>
      </row>
     </tbody>
  </tgroup>
</table>
</figure>
Being off by 15% when talking about an "exabyte" means being off by about 
<m:math><m:mrow><m:mn>1.5</m:mn><m:mo>×</m:mo><m:msup><m:mn>10</m:mn>
<m:mn>17</m:mn></m:msup></m:mrow></m:math> bytes, or 150 petabytes.
</para>
<para id="binary-prefixes-para">
To eliminate this imprecision and confusion, a set of 
<link src="http://physics.nist.gov/cuu/Units/binary.html">prefixes for binary multiples</link>
that closely parallel those for powers of 10 has been adopted as a standard by the International Electrotechnical Commission 
(<link src="http://www.iec.ch">IEC</link>).
</para>
<figure id="tablefig">
<subfigure id="SI-prefixes">
<table id="SI-table" frame="all">
  <name>SI (Metric) Prefixes</name>
  <tgroup cols="3" colsep="1" rowsep="1">
    <thead>
      <row>
        <entry>Factor</entry>
        <entry>Name</entry>
        <entry>Symbol</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>3</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">kilo</entry>
        <entry align="center">k</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>6</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">mega</entry>
        <entry align="center">M</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>9</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">giga</entry>
        <entry align="center">G</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>12</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">tera</entry>
        <entry align="center">T</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>15</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">peta</entry>
        <entry align="center">P</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>18</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">exa</entry>
        <entry align="center">E</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>21</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">zetta</entry>
        <entry align="center">Z</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>10</m:mn><m:mn>24</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">yotta</entry>
        <entry align="center">Y</entry>
      </row>
     </tbody>
  </tgroup>
</table>
<caption>Powers of 10</caption>
</subfigure>
<subfigure id="binary-prefixes">
<table id="binary-table" frame="all">
  <name>IEC Binary Prefixes</name>
  <tgroup cols="3" colsep="1" rowsep="1">
    <thead>
      <row>
        <entry>Factor</entry>
        <entry>Name</entry>
        <entry>Symbol</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>10</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">kibi</entry>
        <entry align="center">Ki</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>20</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">mebi</entry>
        <entry align="center">Mi</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>30</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">gibi</entry>
        <entry align="center">Gi</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>40</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">tebi</entry>
        <entry align="center">Ti</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>50</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">pebi</entry>
        <entry align="center">Pi</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>60</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left">exbi</entry>
        <entry align="center">Ei</entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>70</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left"> </entry>
        <entry align="center"> </entry>
      </row>
      <row>
        <entry align="left">
          <m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>80</m:mn>
          </m:msup></m:mrow></m:math>
        </entry>
        <entry align="left"> </entry>
        <entry align="center"> </entry>
      </row>
     </tbody>
  </tgroup>
</table>
<caption>Powers of 2</caption>
</subfigure>
</figure>
<para id="id100">
The binary symbols are just the SI symbols with an "i" for b<emphasis>i</emphasis>nary appended.
The binary table only goes through 
<m:math><m:mrow><m:msup><m:mn>2</m:mn><m:mn>60</m:mn></m:msup></m:mrow></m:math>,
which is enough to handle the largest number in a 64-bit computer.
</para>
<para id="pronounciation">
There is even 
<link src="http://physics.nist.gov/cuu/Units/binary.html">suggested pronounciation</link>
for the names: "KIH-bee" and "MEH-bee" for kibi and mebi, and similarly for the others.
</para>
<para id="pubdate">
This standard was published by the IEC in 2000, but it appears to have had very little publicity and is almost certainly unknown to most people who deal with computers.  
Adoption of the new prefixes and names by the general population is likely to be slow in coming. 
Getting people to say "mebi bytes" and "gebi bytes" with a straight face may take even longer.
</para>
</section>
<section id="links-sect">
<name>Links</name>
<para id="bipm">
<emphasis>SI</emphasis> stands for <foreign>le Système International d'Unités</foreign>, or International System of Units, commonly called "the metric system" in English-speaking countries.  The 
<link src="http://www.bipm.fr/noflash.html"><foreign>Bureau international des poids et mesures</foreign> (BIPM)</link> in Paris has a good description on their web site (in French and English).
</para>
<para id="nist">
In the US, the 
<link src="http://www.nist.gov">National Institute of Standards and Technology (NIST)</link> has web pages that describe the 
<link src="http://physics.nist.gov/cuu/Units/prefixes.html">SI names and prefixes</link> and the 
<link src="http://physics.nist.gov/cuu/Units/binary.html">binary names and prefixes</link>.
</para>
</section>
</content>  
</document>
