You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.6 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> | tait.tech</title>
<link rel="stylesheet" href="/assets/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="/assets/css/katex.css">
</head>
<body>
<main>
<div id="wrapper">
<h1 id="participation-activity-2">Participation Activity 2</h1>
<h2 id="1">1</h2>
<p>Rounding <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>M</mi><mo>=</mo><msub><mtext>1.10000101001110100101011101</mtext><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">M = \text{1.10000101001110100101011101}_{2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathnormal" style="margin-right:0.10903em;">M</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.79444em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord text"><span class="mord">1.10000101001110100101011101</span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.30110799999999993em;"><span style="top:-2.5500000000000003em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> would produce the following <code class="language-plaintext highlighter-rouge">frac</code>: True or False?</p>
<!--_ Need to put an underscore here to stop my editor from showing everything in italics lol!-->
<table>
<thead>
<tr>
<th>s</th>
<th>exp</th>
<th>frac</th>
</tr>
</thead>
<tbody>
<tr>
<td>N/A</td>
<td>N/A</td>
<td>10000101001110100101011</td>
</tr>
</tbody>
</table>
<h2 id="2">2</h2>
<p>These C statements print 1 (true) on the screen as the result of executing <code class="language-plaintext highlighter-rouge">aFloat == anInt</code>: True or False?</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>float aFloat = 12345; int anInt = aFloat;
printf("%.2f == %d -&gt; %d", aFloat, anInt, aFloat==anInt);
</code></pre></div></div>
<h2 id="3">3</h2>
<p>If we have:</p>
<table>
<tbody>
<tr>
<td>Register/Address</td>
<td>Value</td>
</tr>
<tr>
<td>%rax</td>
<td>0x0100</td>
</tr>
<tr>
<td>%rbx</td>
<td>0x0200</td>
</tr>
<tr>
<td>%rcx</td>
<td>128</td>
</tr>
<tr>
<td>0x0600</td>
<td>5</td>
</tr>
<tr>
<td>0x0400</td>
<td>256</td>
</tr>
<tr>
<td>0x0610</td>
<td>8</td>
</tr>
</tbody>
</table>
<p><code class="language-plaintext highlighter-rouge">%crx</code> would contain 5 once the following instruction has been executed: True or False?</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>movq 0x10(%rbx,%rax,4), %rcx
</code></pre></div></div>
<footer>
</footer>
</div>
</main>
</body>
</html>