<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hades.mech.northwestern.edu//index.php?action=history&amp;feed=atom&amp;title=PIC_computation_time_benchmarks</id>
	<title>PIC computation time benchmarks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hades.mech.northwestern.edu//index.php?action=history&amp;feed=atom&amp;title=PIC_computation_time_benchmarks"/>
	<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;action=history"/>
	<updated>2026-05-01T00:59:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;diff=10811&amp;oldid=prev</id>
		<title>NealEhardt: /* Circuit */</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;diff=10811&amp;oldid=prev"/>
		<updated>2009-03-10T22:51:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Circuit&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:51, 10 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;== Circuit ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;== Circuit ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;[[Image:circuit_diagram.bmp|thumb|400px|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;Circuit Diagram&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Image:circuit_diagram.bmp|thumb|400px|Circuit Diagram]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;The circuit to conduct this test required the PIC 18F4520, power source and an oscilloscope hooked up to a digital output &amp;amp; ground. In the example below the wall power source was used, but a battery could be interchanged. The serial connection was used to update the PIC with each new test written with PIC-C on a nearby PC.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;The circuit to conduct this test required the PIC 18F4520, power source and an oscilloscope hooked up to a digital output &amp;amp; ground. In the example below the wall power source was used, but a battery could be interchanged. The serial connection was used to update the PIC with each new test written with PIC-C on a nearby PC.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;[[Image:pic_configuration.jpg|thumb|500px|left|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;Circuit Configuration&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Image:pic_configuration.jpg|thumb|500px|left|Circuit Configuration]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;[[Image:example_oscilloscope_reading.jpg|thumb|400px|right|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;Example of Oscilloscope Reading&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Image:example_oscilloscope_reading.jpg|thumb|400px|right|Example of Oscilloscope Reading]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;br clear=all&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;br clear=all&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>NealEhardt</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;diff=7191&amp;oldid=prev</id>
		<title>Lynch at 22:41, 2 March 2008</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;diff=7191&amp;oldid=prev"/>
		<updated>2008-03-02T22:41:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:41, 2 March 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;== Original Assignment ==&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;One way for mobile robots to know where they are is by &quot;dead reckoning.&quot;  Dead reckoning means keeping track of how far the wheels have rotated and (assuming no slipping) inferring their position and orientation from this information.  A common instance of this is a differential-drive robot (two wheels driven individually by motors with a third caster for support).  We want to keep track of the robot&#039;s (x, y, &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;) in the plane based on the rotation of the wheels.  &lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;This process usually requires us to calculate the sine and cosine of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;.  We also need to do this computation very often to get good dead reckoning.  We know, however, that the computation of sines and cosines using the math library functions is very time-consuming.  Can we do better (especially if we don&#039;t need very precise calculations)?&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;This project is a benchmarking project.  You will empirically determine how long it takes to perform additions, subtractions, multiplications, divisions, sqrt, cosine, and sine functions with floating point numbers, as well as addition, subtraction, multiplication, and addition with integers (int8, int16, int32, and their signed versions).  For example, you could perform an infinite loop and within that loop, the PIC sets a digital output high, performs another loop of n multiplications or cosines or whatever, then sets the output low, then delays for a fixed time before repeating.  Use an oscilloscope to see how long it takes to do the loop of computations.  Try it for different values of n to make sure your results are consistent.&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Note:  some compilers are smart.  If they see you are doing a lot of computations but not using the results for anything else, they may figure out how to avoid doing some of the computations.  Figure out how to make certain this is or is not happening.&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;Your final wiki page should report the results in a table.  Do floating point divisions take longer than multiplications?  How much slower are sqrt and trigonometric functions?  How about multiplication and division for integers?  All of this information should be apparent in the wiki table, which should use actual times (in microseconds).&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;Now that we have this information, you should consider different methods for computing the sine of an angle.  Here are some possibilities:&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;* simply use the math library sin function&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;* use the Taylor expansion for the sin function in the range of (-pi, pi) at different orders of the approximation, including 5th order, 7th order, and 9th order&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;* look-up table stored in memory (you need only store values for angles between 0 and pi/2; values for other angles can be obtained simply)&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;* others?&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;(Here is a different possibility, relevant for dead reckoning.  You may simply keep track of the variable x=(sin &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;), not &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; itself.  We know x (as a function of angles in radians) is governed by &amp;lt;math&amp;gt;x&#039;&#039; = x&amp;lt;/math&amp;gt;.  So every time a wheel clicks forward or backward one encoder tick (or one more tick than the other wheel), we know the robot has rotated by an angle dtheta.  So we can simply integrate the differential equation to figure out what our new x is.)&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;Your final wiki page should evaluate the efficiency of simply using the math library sin function vs. the Taylor expansion method at different orders, along the dimensions of computation time and accuracy.&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;diff=7155&amp;oldid=prev</id>
		<title>Lynch at 17:54, 21 February 2008</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC_computation_time_benchmarks&amp;diff=7155&amp;oldid=prev"/>
		<updated>2008-02-21T17:54:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Original Assignment ==&lt;br /&gt;
&lt;br /&gt;
One way for mobile robots to know where they are is by &amp;quot;dead reckoning.&amp;quot;  Dead reckoning means keeping track of how far the wheels have rotated and (assuming no slipping) inferring their position and orientation from this information.  A common instance of this is a differential-drive robot (two wheels driven individually by motors with a third caster for support).  We want to keep track of the robot&amp;#039;s (x, y, &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;) in the plane based on the rotation of the wheels.  &lt;br /&gt;
&lt;br /&gt;
This process usually requires us to calculate the sine and cosine of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;.  We also need to do this computation very often to get good dead reckoning.  We know, however, that the computation of sines and cosines using the math library functions is very time-consuming.  Can we do better (especially if we don&amp;#039;t need very precise calculations)?&lt;br /&gt;
&lt;br /&gt;
This project is a benchmarking project.  You will empirically determine how long it takes to perform additions, subtractions, multiplications, divisions, sqrt, cosine, and sine functions with floating point numbers, as well as addition, subtraction, multiplication, and addition with integers (int8, int16, int32, and their signed versions).  For example, you could perform an infinite loop and within that loop, the PIC sets a digital output high, performs another loop of n multiplications or cosines or whatever, then sets the output low, then delays for a fixed time before repeating.  Use an oscilloscope to see how long it takes to do the loop of computations.  Try it for different values of n to make sure your results are consistent.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:  some compilers are smart.  If they see you are doing a lot of computations but not using the results for anything else, they may figure out how to avoid doing some of the computations.  Figure out how to make certain this is or is not happening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Your final wiki page should report the results in a table.  Do floating point divisions take longer than multiplications?  How much slower are sqrt and trigonometric functions?  How about multiplication and division for integers?  All of this information should be apparent in the wiki table, which should use actual times (in microseconds).&lt;br /&gt;
&lt;br /&gt;
Now that we have this information, you should consider different methods for computing the sine of an angle.  Here are some possibilities:&lt;br /&gt;
&lt;br /&gt;
* simply use the math library sin function&lt;br /&gt;
* use the Taylor expansion for the sin function in the range of (-pi, pi) at different orders of the approximation, including 5th order, 7th order, and 9th order&lt;br /&gt;
* look-up table stored in memory (you need only store values for angles between 0 and pi/2; values for other angles can be obtained simply)&lt;br /&gt;
* others?&lt;br /&gt;
&lt;br /&gt;
(Here is a different possibility, relevant for dead reckoning.  You may simply keep track of the variable x=(sin &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;), not &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; itself.  We know x (as a function of angles in radians) is governed by &amp;lt;math&amp;gt;x&amp;#039;&amp;#039; = x&amp;lt;/math&amp;gt;.  So every time a wheel clicks forward or backward one encoder tick (or one more tick than the other wheel), we know the robot has rotated by an angle dtheta.  So we can simply integrate the differential equation to figure out what our new x is.)&lt;br /&gt;
&lt;br /&gt;
Your final wiki page should evaluate the efficiency of simply using the math library sin function vs. the Taylor expansion method at different orders, along the dimensions of computation time and accuracy.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The goal of this task is to determine the speed at which the [http://hades.mech.northwestern.edu/wiki/index.php/4520_Board_intro PIC 18F4520] (with 20MHz clock) makes certain calculations. There are many different  ways to calculate common functions, such as Taylor expansion versus using the sine command. Some of these methods are faster than others, which could effect your program. When a program is dependent on time, such as while using an interrupt service routine for dead reckoning, a slower calculation might not complete within the ISR. Therefore, it is important to use the most efficient method for simple math and trigonometric functions. The following is empirical data of the speed to which certain data types conduct functions.&lt;br /&gt;
&lt;br /&gt;
The process involved programming the function onto a PIC from a PC and using an oscilloscope to measure the time it took to complete. First, we checked to see if our procedure was free of errors. This was done by programming in a simple delay (e.g., 10&amp;amp;mu;s to 50ms) and measuring its accuracy using the cursor feature on the oscilloscope. A digital output was used. The program would output high, run the delay, output low and run another delay. This would effectively display a square wave, where each delay should represent either the logic low or high on the scope. We found no error in our procedure. We then replaced a delay with a function (e.g., 2 + 5). Eventually we changed the code to conduct the function ten times consecutively. This was done to make oscilloscope measurement easier. The number of iterations of the function corresponded linearly with the time, so the time it took to do one function equated to ten times longer for ten functions, or one hundred times longer for one hundred functions. Our findings are summarized below.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
[[Image:circuit_diagram.bmp|thumb|400px|[[Circuit Diagram]]]]&lt;br /&gt;
The circuit to conduct this test required the PIC 18F4520, power source and an oscilloscope hooked up to a digital output &amp;amp; ground. In the example below the wall power source was used, but a battery could be interchanged. The serial connection was used to update the PIC with each new test written with PIC-C on a nearby PC.&lt;br /&gt;
&lt;br /&gt;
An example of an oscilloscope reading can be seen below right. Test readings were accurate with 1, 10 and 100 iteration tests. The cursor function was used to measure the duration of the high output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pic_configuration.jpg|thumb|500px|left|[[Circuit Configuration]]]]&lt;br /&gt;
[[Image:example_oscilloscope_reading.jpg|thumb|400px|right|[[Example of Oscilloscope Reading]]]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;18f4520.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#fuses HS,NOLVP,NOWDT&lt;br /&gt;
#use delay (clock=20000000)&lt;br /&gt;
#define LED_0 PIN_D0&lt;br /&gt;
&lt;br /&gt;
void main(void) {&lt;br /&gt;
 &lt;br /&gt;
   float z;&lt;br /&gt;
   float x=0;&lt;br /&gt;
   float y;&lt;br /&gt;
   float xsquared, xcubed, xfifth, xseventh, xninth;&lt;br /&gt;
   &lt;br /&gt;
   while(TRUE){&lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
      output_high(LED_0);  // Do not use loop for the calculations because it will take time to iterate&lt;br /&gt;
         &lt;br /&gt;
         //ninth order Taylor series (sine). Multiply by 1/n! instead of dividing by n! (multiplication is faster)&lt;br /&gt;
         &lt;br /&gt;
         xsquared = x*x;      //use these variables to keep calculation time down (instead of x*x*x*x*x....)&lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573); &lt;br /&gt;
         xsquared = x*x;      &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;      &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;      &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;    &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333) - (xseventh*.0001984127) + (xninth*.00000275573);&lt;br /&gt;
         &lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
         z = x + y;  // code for simple math, change operations and variable types&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
         z = x + y;&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
       &lt;br /&gt;
                &lt;br /&gt;
      output_low(LED_0);&lt;br /&gt;
         &lt;br /&gt;
         //seventh order Taylors series (sine)&lt;br /&gt;
         &lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
         xsquared = x*x;     &lt;br /&gt;
         xcubed=xsquared*x;&lt;br /&gt;
         xfifth=xcubed*xsquared;&lt;br /&gt;
         xseventh=xfifth*xsquared;&lt;br /&gt;
         xninth=xseventh*xsquared;&lt;br /&gt;
         z = x - (xcubed*0.1666666) + (xfifth*.008333333);&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
         z = sqrt(x);  //square root test&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
         z = sqrt(x);&lt;br /&gt;
&lt;br /&gt;
*/                  &lt;br /&gt;
              &lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
=== Simple Math Functions ===&lt;br /&gt;
&lt;br /&gt;
The below table contains the results from our operation testing. All the values are given in &amp;amp;mu;s and the value in parentheses is the time normalized to the quickest operation in the entire table.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Function&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Int8&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Int16&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Int32&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Signed Int8&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Signed Int16&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Signed Int32&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Float&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Addition (+)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.64&amp;amp;mu;s (1.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.24&amp;amp;mu;s (1.94)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.44&amp;amp;mu;s (3.81)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.64&amp;amp;mu;s (1.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.24&amp;amp;mu;s (1.94)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.44&amp;amp;mu;s (3.81)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;25.6&amp;amp;mu;s (40.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Subtraction (-)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.68&amp;amp;mu;s (1.06)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.28&amp;amp;mu;s (2.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.48&amp;amp;mu;s (3.88)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.68&amp;amp;mu;s (1.06)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.28&amp;amp;mu;s (2.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.48&amp;amp;mu;s (3.88)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;29.8&amp;amp;mu;s (46.56)*&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Multiplication (*)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.8&amp;amp;mu;s (1.25)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;6.0&amp;amp;mu;s (9.38)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;45.0&amp;amp;mu;s (70.31)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.92&amp;amp;mu;s (1.44)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;6.0&amp;amp;mu;s (9.38)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;46.0&amp;amp;mu;s (71.88)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;26.0&amp;amp;mu;s-28.0&amp;amp;mu;s (40.63-43.75)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Division (/)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;19.4&amp;amp;mu;s (30.31)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;60.8&amp;amp;mu;s (95.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;195.0&amp;amp;mu;s (304.69)*&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;22.4&amp;amp;mu;s (35.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;64.4&amp;amp;mu;s (100.63)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;201.0&amp;amp;mu;s (314.06)*&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;176.0&amp;amp;mu;s-226.0&amp;amp;mu;s (275.00-353.13)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;And (&amp;amp;)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.64&amp;amp;mu;s (1.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.24&amp;amp;mu;s (1.94)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.44&amp;amp;mu;s (3.81)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Or ( | )&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.68&amp;amp;mu;s (1.06)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.28&amp;amp;mu;s (2.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.48&amp;amp;mu;s (3.88)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Shift (&amp;gt;&amp;gt;1)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.64&amp;amp;mu;s (1.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.04&amp;amp;mu;s (1.63)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.84&amp;amp;mu;s (2.88)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Shift (&amp;gt;&amp;gt;2)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.04&amp;amp;mu;s (1.63)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.64&amp;amp;mu;s (2.56)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.84&amp;amp;mu;s (4.44)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Shift (&amp;gt;&amp;gt;3)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.24&amp;amp;mu;s (1.94)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.04&amp;amp;mu;s (3.19)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;3.64&amp;amp;mu;s (5.69)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Shift (&amp;lt;&amp;lt;1)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.68&amp;amp;mu;s (1.06)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.08&amp;amp;mu;s (1.69)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.88&amp;amp;mu;s (2.94)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Shift (&amp;lt;&amp;lt;2)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.08&amp;amp;mu;s (1.69)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.68&amp;amp;mu;s (2.63)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.88&amp;amp;mu;s (4.50)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Shift (&amp;lt;&amp;lt;3)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.28&amp;amp;mu;s (2.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2.08&amp;amp;mu;s (3.25)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;3.68&amp;amp;mu;s (5.75)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Table 1.1 Simple Math Functions&lt;br /&gt;
( * Indicates an averaged field)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, there are clear advantages to using smaller data types. There are even some operations that take slower with signed data types versus unsigned. Most all of the data was constant for small and large values for these simple math operations. For float data types, differing values tended to vary in time. Variability was also seen in some int32 calculations. These results are either given as an experimental range (if significant variability) or averaged (less than 4% variability).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Chapter 8 of the [http://129.105.69.13/datasheets/Microcontrollers/PIC18F4520.pdf PIC manual] lists the computation time for several multiply operations. Table 1.2 shows the values from the PIC manual compared to our measurements. As you can see, the calculation times are within an order of magnitude from each other. One difference is that in our measurements signed and unsigned multiplication took nearly the same amount of time. This was unexpected as the algorithm for signed multiplication (as outlined in the PIC manual) should take longer than unsigned multiplication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; width=&amp;quot;52.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Routine&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Time at 20 MHz clock speed*&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Measured Values&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;int8 x int8 (unsigned)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.2 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.8 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;int8 x int8 (signed)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.2 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.92 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;int16 x int16 (unsigned)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;5.6 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;6.0 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;int16 x int16 (signed)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;8.0 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;6.0 us&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Table 1.2 Multiplication times compared to PIC manual values (* Times derived from Table 8-1 of PIC manual)&lt;br /&gt;
&lt;br /&gt;
=== Multiplication, Division &amp;amp; Shifts ===&lt;br /&gt;
&lt;br /&gt;
For most integer types shifting is much quicker than multiplication and division. The exception is shifting more than one place for Int8 will take slightly longer. Therefore, if you are multiplying by 2&amp;lt;sup&amp;gt;#&amp;lt;/sup&amp;gt; (where # is any positive integer value) it is faster to use a shift. The same is true if you are dividing by any factor of 2&amp;lt;sup&amp;gt;#&amp;lt;/sup&amp;gt;. In this case shifting to the right divides and vice versa for multiplication.&lt;br /&gt;
&lt;br /&gt;
Division is much slower than multiplication across all data types. If you are computing a float it is much faster to multiply by a reciprocal. Below is a table of two functions that compute the same value but at very different speeds. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; width=&amp;quot;35%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Function&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Time&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2 * 0.1&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;28&amp;amp;mu;s (1.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2 / 10&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;200&amp;amp;mu;s (7.14)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2* 0.001&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;28&amp;amp;mu;s (1.00)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;2 / 1000&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;220&amp;amp;mu;s (7.86)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Trigonometric Functions &amp;amp; Square Root ===&lt;br /&gt;
&lt;br /&gt;
Table 1.3 shows the results from the trigonometric, square root, and [http://en.wikipedia.org/wiki/Taylor_expansion Taylor Expansion] tests. The Taylor expansion example below is a ninth order. To conduct seventh or fifth order expansions one just drops out the higher terms. Sine and cosine functions take about the same time with tangent being slightly slower. Also, the square root function was slightly slower than the sine function. Note that the fast cosine value (0.24 ms) was for cos(0). Other than this value the time range closely matches that for sine.  As shown the Taylor series approximation for sine is faster than using the sine command. It is important to note from our code that we multiplied by a reciprocal. Computing a Taylor series with division takes just a long as using the sine function. As expected, a higher order approximation will take more time. Depending on the amount of accuracy you need, using the Taylor approximation will save a significant amount of time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Taylor_Expansion_9th_Order.bmp|thumb|300px|left|[[Taylor Expansion 9th Order]]]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; width=&amp;quot;52.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Function&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Time Range (normalized)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Error&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Sin&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.27-1.20 ms (3.80-16.9)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Sin (Taylor-9th order)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.106-0.380 ms (1.49-5.35)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.006925&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Sin (Taylor-7th order)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.089-0.312 ms (1.25-4.39)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.07522&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Sin (Taylor-5th order)&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.071-0.252 ms (1.00-3.55)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.5240&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Cos&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.24-1.14 ms (3.38-16.1)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;n/a&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Tan&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;1.37-2.52 ms (19.3-35.5)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;n/a&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Sqrt&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;12.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;0.98-1.26 ms (13.8-17.7)&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;17.5%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;-1&amp;quot;&amp;gt;n/a&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Table 1.3 Trigonometric Functions and Square Root (all measurements are for float variables)&lt;br /&gt;
&lt;br /&gt;
=== Algorithms for Square Root and Trigonometric Functions ===&lt;br /&gt;
There are several algorithms that can be used to compute the square root. The basic steps are:&lt;br /&gt;
&lt;br /&gt;
:   1. Start with an initial guess, &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
:   2. Multiply &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; by itself (or perform a different calculation).&lt;br /&gt;
:   3. See how close this solution is to the argument.&lt;br /&gt;
:   4. Change &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; and iterate until you are close enough to the argument.&lt;br /&gt;
&lt;br /&gt;
One such algorithm is the [http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method Babylonian method]. The way the PIC chooses the initial value, &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt;, can affect the speed of the calculation. One way of choosing &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; is to set it equal to &amp;lt;math&amp;gt;2^{\left\lfloor D/2\right\rfloor}&amp;lt;/math&amp;gt; with D equal to the number of binary digits in the argument. The closer &amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; is to the actual answer the faster the computation will be. This is why there is a range for computation times because the initial value the PIC chooses will affect the algorithm speed. The algorithm also conducted an initial test of validity. Values less than zero were immediately rejected, because this algorithm does not compute imaginary numbers. We also noticed that very large numbers (we tried 10&amp;lt;sup&amp;gt;17&amp;lt;/sup&amp;gt;) were also rejected. This initial validity test also contributes to slower calculation speeds. &lt;br /&gt;
&lt;br /&gt;
One method that the PIC can use to calculate trigonometric functions is the [http://en.wikipedia.org/wiki/CORDIC CORDIC algorithm].&lt;br /&gt;
CORDIC is a type of shift-and-add algorithm that rotates a vector. An initial vector, &amp;#039;&amp;#039;v&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt;, is set and then multiplied by a rotation matrix. The rotation of the vector is repeated until its angle is close to the desired angle, &amp;lt;math&amp;gt; \theta &amp;lt;/math&amp;gt;. The sine of &amp;lt;math&amp;gt; \theta &amp;lt;/math&amp;gt; is the vector&amp;#039;s projection onto the y-axis, while the cosine is the projection onto the x-axis. The number of iterations that the algorithm has to make depends on the angle, &amp;lt;math&amp;gt; \theta &amp;lt;/math&amp;gt;. Thus, the PIC&amp;#039;s computation time for trigonometric functions will vary depending on the angle.&lt;/div&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
</feed>