added tooltips to blogs 2, 3, and 4

This commit is contained in:
Joshua Perry 2022-04-16 19:34:15 +01:00
parent 5bdbef1905
commit ce8379da63
1 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@
<p class="blog_content">In primary school we are taught to use long addition to sum numbers on paper. The practice relies on the concept of carrying digits to
other columns when the simple addition excedes 10. We can use the same technique to add binary numbers just instead of carrying when
exceding 10, we do this at 1. The best way to visualise this is with a couple of rules whenn carrying. First, when adding two 1s in a column,
the answer is 0 carry 1. Secondly, when adding three 1s in a column (from a previous carry), the answer is 1 carry 1.</p>
the answer is 0 carry 1. Secondly, when <span class="moreInfo">adding three 1s in a column<span class="extraInfo">from a previous carry</span></span>, the answer is 1 carry 1.</p>
<p class="blog_details"></p>
</section>
<section class="blog_post" id="third">
@ -63,8 +63,8 @@
<img class="blog_image" src="assets/blog/images/third.jpg"/>
<p class="blog_content">Subtraction in binary is a little hard as it is not as intuitive as the addition. To subtract two binary numbers we use a method known as
2's complement. 2's complement is a way of expressing a binary number as a negative. After doing this conversion, you can just add the two
numbers and it will give the same answer as if the two numbers were subtracted in denary. To find 2's complement, you begin by inverting
each bit in the number (if the bit is a 0 it becomes 1, and vice versa) and then add 1.</p>
numbers and it will give the same answer as if the two numbers were subtracted in denary. To find 2's complement, you begin by <span class="moreInfo">inverting
each bit in the number<span class="extraInfo">if the bit is a 0 it becomes 1, and vice versa</span></span> and then add 1.</p>
<p class="blog_details"></p>
</section>
@ -73,7 +73,7 @@
<h1 class="blog_title">Binary to Hexadecimal Conversions</h1>
<img class="blog_image" src="assets/blog/images/fourth.png"/>
<p class="blog_content">Hexadecimal is another base system used in programming. Just like binary and denary hexadecimal creates a new column when it's
limit is reached (15). However, as the base system is higher than our standard system (denary), we use letters (A-f) to express the
<span class="moreInfo">limit<span class="extraInfo">15</span></span> is reached. However, as the base system is higher than our <span class="moreInfo">standard system<span class="extraInfo">denary</span></span>, we use <span class="moreInfo">letters<span class="extraInfo">A-F</span></span> to express the
numbers 10-15 so that they can be single digits.</p>
<p class="blog_content">To convert from binary to hexadecimal, split the 8-bit number into two 4 bit numbers and convert these numbers to denary. For any number