Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Deployed e15e622 with MkDocs version: 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Sep 17, 2023
1 parent 31e8246 commit c7faadc
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 19 deletions.
15 changes: 13 additions & 2 deletions blog/2023/09/14/overflow-in-twos-complement-system/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 20a8 8 0 0 0 8-8 8 8 0 0 0-8-8 8 8 0 0 0-8 8 8 8 0 0 0 8 8m0-18a10 10 0 0 1 10 10 10 10 0 0 1-10 10C6.47 22 2 17.5 2 12A10 10 0 0 1 12 2m.5 5v5.25l4.5 2.67-.75 1.23L11 13V7h1.5Z"/></svg>
<span class="md-ellipsis">

3 min read
4 min read

</span>
</div>
Expand Down Expand Up @@ -821,15 +821,26 @@ <h4 id="reasons-behind">Reasons behind<a class="headerlink" href="#reasons-behin
<h4 id="implementation">Implementation<a class="headerlink" href="#implementation" title="Permanent link">&para;</a></h4>
<h3 id="method-2-compare-the-carry-on-bit-and-carry-out-bit-of-the-msb-column">Method 2: Compare the carry-on bit and carry-out bit of the MSB column<a class="headerlink" href="#method-2-compare-the-carry-on-bit-and-carry-out-bit-of-the-msb-column" title="Permanent link">&para;</a></h3>
<h4 id="conclusion_1">Conclusion<a class="headerlink" href="#conclusion_1" title="Permanent link">&para;</a></h4>
<p>If the carry-on bit and carry-out bit of the MSB column are different, then the overflow occurs.</p>
<h4 id="reasons-behind_1">Reasons behind<a class="headerlink" href="#reasons-behind_1" title="Permanent link">&para;</a></h4>
<p>To rigorously prove that, the problem can be divided into two cases since in a binary system, we only have 0 and 1.</p>
<ul>
<li>case one:</li>
</ul>
<p>The carry-on bit is 1 and the carry-out bit is 0. So, in order to let the carry-out bit be 1, the sign bit of the two operands must be 0. (You can easily understand this by trying yourself. i.e. If any of the sign bit is 1, then 1 + 1 = 10, which will generate a carry-out bit of 1. Contraction!) Now, let's see the MSB column, which contains three numbers, above the line are the sign bits of two operands. Below the line is the sign bit of the result. Based on the previous statement, from top to bottom, the three numbers should be 0, 0, 1. Now, you will find that the sign bit of the result is different from the sign bit of the two operands. Based on what we have already discussed in <a href="#method-1-compare-the-sign-bit-of-operands-and-result">Method 1</a>, you will find that an overflow has happened.</p>
<ul>
<li>case two:</li>
</ul>
<p>Now the carry-on bit is 0 and the carry-out bit is 1. Using the similar method discussed in <strong>case one</strong>, you can easily find that the overflow has happened. So, I won't repeat it here.</p>
<p>Now, <a href="#method-2-compare-the-carry-on-bit-and-carry-out-bit-of-the-msb-column">Method 2</a> has also been proved to be correct! Congratulations! Now, hope that you already have a brand new undestanding of the overflow in two's complement system.</p>
<h4 id="implementation_1">Implementation<a class="headerlink" href="#implementation_1" title="Permanent link">&para;</a></h4>

<hr>
<div class="md-source-file">
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">September 16, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">September 17, 2023</span>

<br>
Created:
Expand Down
2 changes: 1 addition & 1 deletion blog/archive/2023/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ <h1 id="2023">2023<a class="headerlink" href="#2023" title="Permanent link">&par

<li class="md-meta__item">

3 min read
4 min read

</li>

Expand Down
2 changes: 1 addition & 1 deletion blog/category/ntu-scse-resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ <h1 id="ntu-scse-resources">NTU SCSE Resources<a class="headerlink" href="#ntu-s

<li class="md-meta__item">

3 min read
4 min read

</li>

Expand Down
2 changes: 1 addition & 1 deletion blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ <h1 id="blog">Blog<a class="headerlink" href="#blog" title="Permanent link">&par

<li class="md-meta__item">

3 min read
4 min read

</li>

Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,67 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://mendax1234.github.io/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/index.zh/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/2023/08/15/the-conversion-between-binary-and-gray-code/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/2023/09/09/combinational-circuits-in-digital-logic/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/2023/07/23/hello-world/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/2023/08/22/the-first-month-in-ntu/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/2023/09/14/overflow-in-twos-complement-system/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/2023/09/09/tricky-python/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/archive/2023/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/category/ntu-scse-resources/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/category/ntu-life/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://mendax1234.github.io/blog/category/general/</loc>
<lastmod>2023-09-16</lastmod>
<lastmod>2023-09-17</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit c7faadc

Please sign in to comment.