<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nothing to see here &#187; Units</title>
	<atom:link href="http://www.endolith.com/wordpress/category/units/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.endolith.com/wordpress</link>
	<description>move along</description>
	<lastBuildDate>Sat, 03 Dec 2011 22:20:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Don&#8217;t trust Google calculator</title>
		<link>http://www.endolith.com/wordpress/2007/02/09/dont-trust-google-calculator/</link>
		<comments>http://www.endolith.com/wordpress/2007/02/09/dont-trust-google-calculator/#comments</comments>
		<pubDate>Sat, 10 Feb 2007 03:30:37 +0000</pubDate>
		<dc:creator>Endolith</dc:creator>
				<category><![CDATA[Units]]></category>
		<category><![CDATA[binary prefix]]></category>
		<category><![CDATA[GNU units]]></category>
		<category><![CDATA[Google Calculator]]></category>
		<category><![CDATA[KiB]]></category>
		<category><![CDATA[kibibyte]]></category>
		<category><![CDATA[kilobyte]]></category>
		<category><![CDATA[unit conversion]]></category>

		<guid isPermaLink="false">http://endolith.com/wordpress/2007/02/10/dont-trust-google-calculator/</guid>
		<description><![CDATA[The term &#8220;kilobyte&#8221; means 1,024 bytes. Right? Usually. Most people reading this are experienced with computers and know that, in many computing contexts, kilobyte means 1,024 bytes. Descriptions of file sizes, memory, and so on. However, in some situations (and in the minds of most non-technical people; I&#8217;ve asked), kilobyte means 1,000 bytes. More importantly, [...]]]></description>
			<content:encoded><![CDATA[<p>The term &#8220;kilobyte&#8221; means 1,024 bytes.</p>
<p>Right?</p>
<p>Usually.</p>
<p>Most people reading this are experienced with computers and know that, in many computing contexts, kilobyte means 1,024 bytes.  Descriptions of file sizes, memory, and so on.  However, in some situations (and in the minds of most non-technical people; I&#8217;ve asked), kilobyte means 1,000 bytes.  More importantly, units like kilo<em>bit</em> usually mean 1,000 bits rather than 1,024.  (Especially in the unit <em>kilobits per second</em>, or kbps, which <em>always</em> means 1,000 bits per second.)  <a title="Google Calculator: 1 kbps in bits per second" href="http://www.google.com/search?q=1+kbps+in+bits+per+second">Google gets this wrong</a>, and just uses 1,024 for everything.  Wrong wrong wrong.</p>
<p>So any time you&#8217;re using Google to do computer-related calculations, be very sure you&#8217;re getting the result you want.  I was first miffed by this when (at work) I stupidly trusted Google&#8217;s result about the bit rate requirements for streaming audio, for instance.</p>
<p>At the very least, they should provide a short explanation and disclaimer for calculations involving computer units, to explain the discrepancy to people who don&#8217;t know about it, especially given that confusion about the issue has resulted in <a title="The implicit use of decimal units to describe the capacity of storage devices has become a source of confusion as these devices are increasingly marketed to non-technical consumers." href="http://en.wikipedia.org/wiki/Binary_prefix#Legal_disputes">litigation</a>.  Google calculator doesn&#8217;t seem like a huge target for lawyers, but they care enough to provide a little warning and disclaimer when you do a currency conversion:</p>
<blockquote><p>Rates provided for information only &#8211; <a href="http://www.google.com/intl/en/help/currency_disclaimer.html">see disclaimer</a>. <a href="http://www.google.com/intl/en/help/features.html#currency">More about currency conversion.</a></p></blockquote>
<p>Even better, they could just do it right.  <a title="Prefixes for binary multiples - In December 1998 the International Electrotechnical Commission (IEC), the leading international organization for worldwide standardization in electrotechnology, approved as an IEC International Standard names and symbols for prefixes for binary multiples for use in the fields of data processing and data transmission." href="http://www.physics.nist.gov/cuu/Units/binary.html">Unambiguous units</a> have been around since 1999, and <a title="IEC prefixes and symbols for binary multiples" href="http://members.optus.net/alexey/prefBin.xhtml">have been adopted</a> by standards organizations and <a title="Wikipedia - Binary prefix adoption" href="http://en.wikipedia.org/wiki/Binary_prefix#Adoption">open-source software</a>.</p>
<p>Ironically, Google <a title="Google Calculator: 1 kibibyte in bytes" href="http://www.google.com/search?q=1+kibibyte+in+bytes">is aware of these units</a>, but still uses <a title="Google Calculator: 1 kilobyte in bytes" href="http://www.google.com/search?q=1+kilobyte+in+bytes">1,024 for both</a>.  For shame.</p>
<hr />
<h3 id="toc-update-january-2008">Update January 2008</h3>
<p>I’ve actually talked to one of the employees who worked on Google Calculator.  He had already largely convinced the other maintainers that they should fix this, but left the company before he had a chance to implement it.</p>
<p>I’ve since discovered that <a href="http://www.gnu.org/software/units/">GNU Units</a> implements a lot of the same functionality, but:</p>
<ul>
<li>You can use it offline, without webpage-loading delay.</li>
<li>It handles a lot more units and prefixes.</li>
<li>You can create your own units in a <code>~/.units.dat</code> file.</li>
<li>It uses the standard definitions for &#8220;kilobyte&#8221;, &#8220;kB&#8221;, and &#8220;KiB&#8221;.</li>
<li>It runs on Unixes, <a href="http://gunits.darwinports.com/">Apples</a> and <a title="Units for Windows" href="http://gnuwin32.sourceforge.net/packages/units.htm">Windows</a>.</li>
</ul>
<p>Yay!</p>
<pre>&gt; units -1v "3 kilometers + 500 feet" yards
	3 kilometers + 500 feet = 3447.5066 yards

&gt; units -1v "16 bit * 44.1 kHz * 2" kbps # <a href="http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)#Technical_details">Compact disc bit rate</a> - <a href="http://www.google.com/search?q=16+bit+*+44.1+kHz+*+2+in+kbps">Google gets this wrong.</a>
	16 bit * 44.1 kHz * 2 = 1411.2 kbps

&gt; units -1v "5 million pounds" megakilogram
	5 million pounds = 2.2679619 megakilogram

&gt; units -1v "one hundred V / 5 ohms" A
	one hundred V / 5 ohms = 20 A

&gt; units -1v "1/(2*pi*sqrt(10*microF*100 mH))" Hz # <a href="http://en.wikipedia.org/wiki/LC_circuit#Resonance_effect">resonance frequency of an LC circuit</a>
	1/(2*pi*sqrt(10*microF*100 mH)) = 159.15494 Hz

&gt; units -1v "sqrt(mu0/epsilon0)" ohm # <a title="Wikipedia - Impedance of free space" href="http://en.wikipedia.org/wiki/Impedance_of_free_space">impedance of free space</a>
	sqrt(mu0/epsilon0) = 376.73031 ohm

&gt; units -1v "sqrt(4 k stdtemp 1 kohm (20 kHz - 20 Hz))" nanovolt # <a href="http://en.wikipedia.org/wiki/Thermal_noise#Noise_voltage_and_power">thermal noise of a resistor
</a>	sqrt(4 k stdtemp 1 kohm (20 kHz - 20 Hz)) = 548.99727 nanovolt

&gt; units -1v "furlong per fortnight" cm/minute
	furlong per fortnight = 0.99785714 cm/minute

&gt; units -1v attoparsec/microfortnight inch/sec
	attoparsec/microfortnight = 1.0043268 inch/sec</pre>
<p>Unfortunately, it cannot calculate <a title="Google Calculator results" href="http://www.google.com/search?q=answer+to+life+the+universe+and+everything">the answer to life the universe and everything</a>, but you should probably have that memorized, anyway.  You know, just in case&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.endolith.com/wordpress/2007/02/09/dont-trust-google-calculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

