From ce8379da6353dfa88b575aed55421c9be3ddaa33 Mon Sep 17 00:00:00 2001 From: Joshua Perry <45966243+jpez-development@users.noreply.github.com> Date: Sat, 16 Apr 2022 19:34:15 +0100 Subject: [PATCH] added tooltips to blogs 2, 3, and 4 --- blog/blog.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blog/blog.html b/blog/blog.html index 21cd20b..6df15d5 100644 --- a/blog/blog.html +++ b/blog/blog.html @@ -54,7 +54,7 @@
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.
+ the answer is 0 carry 1. Secondly, when adding three 1s in a columnfrom a previous carry, the answer is 1 carry 1.
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.
+ 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 numberif the bit is a 0 it becomes 1, and vice versa and then add 1.
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 + limit15 is reached. However, as the base system is higher than our standard systemdenary, we use lettersA-F to express the numbers 10-15 so that they can be single digits.
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