168 lines
5.6 KiB
HTML
168 lines
5.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of UNITS</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>UNITS</H1>
|
|
Section: Linux Programmer's Manual (7)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
units - decimal and binary prefixes
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H3>Decimal prefixes</H3>
|
|
|
|
The SI system of units uses prefixes that indicate powers of ten.
|
|
A kilometer is 1000 meter, and a megawatt is 1000000 watt.
|
|
Below the standard prefixes.
|
|
<DL COMPACT><DT id="1"><DD>
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>Prefix</TD><TD>Name</TD><TD>Value<BR></TD></TR>
|
|
<TR VALIGN=top><TD>y</TD><TD>yocto</TD><TD>10^-24 = 0.000000000000000000000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>z</TD><TD>zepto</TD><TD>10^-21 = 0.000000000000000000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>a</TD><TD>atto</TD><TD>10^-18 = 0.000000000000000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>f</TD><TD>femto</TD><TD>10^-15 = 0.000000000000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>p</TD><TD>pico</TD><TD>10^-12 = 0.000000000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>n</TD><TD>nano</TD><TD>10^-9 = 0.000000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>µ</TD><TD>micro</TD><TD>10^-6 = 0.000001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>m</TD><TD>milli</TD><TD>10^-3 = 0.001<BR></TD></TR>
|
|
<TR VALIGN=top><TD>c</TD><TD>centi</TD><TD>10^-2 = 0.01<BR></TD></TR>
|
|
<TR VALIGN=top><TD>d</TD><TD>deci</TD><TD>10^-1 = 0.1<BR></TD></TR>
|
|
<TR VALIGN=top><TD>da</TD><TD>deka</TD><TD>10^ 1 = 10<BR></TD></TR>
|
|
<TR VALIGN=top><TD>h</TD><TD>hecto</TD><TD>10^ 2 = 100<BR></TD></TR>
|
|
<TR VALIGN=top><TD>k</TD><TD>kilo</TD><TD>10^ 3 = 1000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>M</TD><TD>mega</TD><TD>10^ 6 = 1000000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>G</TD><TD>giga</TD><TD>10^ 9 = 1000000000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>T</TD><TD>tera</TD><TD>10^12 = 1000000000000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>P</TD><TD>peta</TD><TD>10^15 = 1000000000000000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>E</TD><TD>exa</TD><TD>10^18 = 1000000000000000000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Z</TD><TD>zetta</TD><TD>10^21 = 1000000000000000000000<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Y</TD><TD>yotta</TD><TD>10^24 = 1000000000000000000000000<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
The symbol for micro is the Greek letter mu, often written u
|
|
in an ASCII context where this Greek letter is not available.
|
|
See also
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
</DL>
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Binary prefixes</H3>
|
|
|
|
The binary prefixes resemble the decimal ones,
|
|
but have an additional 'i'
|
|
(and "Ki" starts with a capital 'K').
|
|
The names are formed by taking the
|
|
first syllable of the names of the decimal prefix with roughly the same
|
|
size, followed by "bi" for "binary".
|
|
<DL COMPACT><DT id="3"><DD>
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>Prefix</TD><TD>Name</TD><TD>Value<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Ki</TD><TD>kibi</TD><TD>2^10 = 1024<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Mi</TD><TD>mebi</TD><TD>2^20 = 1048576<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Gi</TD><TD>gibi</TD><TD>2^30 = 1073741824<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Ti</TD><TD>tebi</TD><TD>2^40 = 1099511627776<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Pi</TD><TD>pebi</TD><TD>2^50 = 1125899906842624<BR></TD></TR>
|
|
<TR VALIGN=top><TD>Ei</TD><TD>exbi</TD><TD>2^60 = 1152921504606846976<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
See also
|
|
<P>
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Discussion</H3>
|
|
|
|
Before these binary prefixes were introduced, it was fairly
|
|
common to use k=1000 and K=1024, just like b=bit, B=byte.
|
|
Unfortunately, the M is capital already, and cannot be
|
|
capitalized to indicate binary-ness.
|
|
<P>
|
|
|
|
At first that didn't matter too much, since memory modules
|
|
and disks came in sizes that were powers of two, so everyone
|
|
knew that in such contexts "kilobyte" and "megabyte" meant
|
|
1024 and 1048576 bytes, respectively.
|
|
What originally was a
|
|
sloppy use of the prefixes "kilo" and "mega" started to become
|
|
regarded as the "real true meaning" when computers were involved.
|
|
But then disk technology changed, and disk sizes became arbitrary numbers.
|
|
After a period of uncertainty all disk manufacturers settled on the
|
|
standard, namely k=1000, M=1000 k, G=1000 M.
|
|
<P>
|
|
|
|
The situation was messy: in the 14k4 modems, k=1000; in the 1.44 MB
|
|
|
|
diskettes, M=1024000; and so on.
|
|
In 1998 the IEC approved the standard
|
|
that defines the binary prefixes given above, enabling people
|
|
to be precise and unambiguous.
|
|
<P>
|
|
|
|
Thus, today, MB = 1000000 B and MiB = 1048576 B.
|
|
<P>
|
|
|
|
In the free software world programs are slowly
|
|
being changed to conform.
|
|
When the Linux kernel boots and says
|
|
<P>
|
|
|
|
|
|
|
|
hda: 120064896 sectors (61473 MB) w/2048KiB Cache
|
|
|
|
|
|
<P>
|
|
|
|
the MB are megabytes and the KiB are kibibytes.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="4"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="5"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAD">Decimal prefixes</A><DD>
|
|
<DT id="7"><A HREF="#lbAE">Binary prefixes</A><DD>
|
|
<DT id="8"><A HREF="#lbAF">Discussion</A><DD>
|
|
</DL>
|
|
<DT id="9"><A HREF="#lbAG">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:10 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|