102 lines
7.1 KiB
HTML
102 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Portfolio showcasing projects worked on by Joshua Perry">
|
|
<meta name="keywords" content="HTML, CSS, JavaScript, jpez, jpez-development, home, bio, portfolio">
|
|
<meta name="author" content="Joshua Perry">
|
|
|
|
<base href="../">
|
|
|
|
<title>J-Pez Development</title>
|
|
<link rel="icon" type="image/svg+xml" href="assets/images/favicon.svg">
|
|
|
|
<link rel="stylesheet" href="style/main.css" media = "screen">
|
|
<link rel="stylesheet" href="style/mobile.css" media ="screen and (max-width:800px)">
|
|
<link rel="stylesheet" href="blog/blog.css" media="screen">
|
|
</head>
|
|
<body id="clicked">
|
|
|
|
<nav class="navigation">
|
|
<a class="hidenav" href="blog/blog.html#"> X</a>
|
|
<a class="nav link" id="home" href="home/index.html"><h2>J-Pez Development</h2></a>
|
|
<a class="nav link" id="port" href="portfolio/portfolio.html"><h2>Portfolio</h2></a>
|
|
<a class="nav link" id="blog" href="blog/blog.html"><h2>Blog</h2></a>
|
|
<a class="nav link" id="contact" href="contact/contact.html"><h2>Contact</h2></a>
|
|
<a class="arrow right"></a>
|
|
</nav>
|
|
|
|
<main id="open">
|
|
<a class="shownav" href="blog/blog.html#clicked"></a>
|
|
<section class="blog">
|
|
<section class="blog_post" id="first">
|
|
<button class="arrow"></button>
|
|
<h1 class="blog_title">Binary to Denary Conversions</h1>
|
|
<img class="blog_image" src="assets/blog/images/first.png"/>
|
|
<p class="blog_content">The image above is an example of a table we can use to convert <span class="moreInfo">8-bit binary numbers<span class="extraInfo">referred to as bytes</span></span> to denary.
|
|
Each individual bit is put into each column in the same order as written. Any columns with a 1 should have their values added together.
|
|
The resulting value is the denary conversion.
|
|
|
|
To convert from denary to binary, take the number you wish to convert and starting in the left most column try subtracting the number from
|
|
the one you wish to convert. If it can be done without producing a negative put a 1 in the column, if you cannot, put a 0. Once the remainder is 0,
|
|
add 0s to any remaining columns. The resulting number is the binary conversion.
|
|
|
|
If you want to convert above 8-bit numbers, each column's denary value is calculated as 2 raised to the power of the column starting from the right and at 0.
|
|
</p>
|
|
<p class="blog_details"></p>
|
|
</section>
|
|
<section class="blog_post" id="second">
|
|
<button class="arrow"></button>
|
|
<h1 class="blog_title">Binary Addition</h1>
|
|
<img class="blog_image" src="assets/blog/images/second.jpg"/>
|
|
<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>
|
|
<p class="blog_details"></p>
|
|
</section>
|
|
<section class="blog_post" id="third">
|
|
<button class="arrow"></button>
|
|
<h1 class="blog_title">Binary Subtraction Using 2's Complement</h1>
|
|
<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>
|
|
<p class="blog_details"></p>
|
|
|
|
</section>
|
|
<section class="blog_post" id="fourth">
|
|
<button class="arrow"></button>
|
|
<h1 class="blog_title">Blog Title</h1>
|
|
<img class="blog_image" src="assets/images/profileImage.png"/>
|
|
<p class="blog_content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Iste mollitia repellat, possimus nesciunt aspernatur quisquam doloremque! Illo, debitis distinctio, nostrum voluptatum possimus minus odio quaerat quia fugit maiores porro. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate quas recusandae dolorum sunt porro vero, temporibus nesciunt cum, sint iure quis suscipit dignissimos maiores cumque debitis nihil, eveniet dolores nemo.</p>
|
|
<p class="blog_details"></p>
|
|
|
|
</section>
|
|
<section class="blog_post" id="fifth">
|
|
<button class="arrow"></button>
|
|
<h1 class="blog_title">Blog Title</h1>
|
|
<img class="blog_image" src="assets/images/profileImage.png"/>
|
|
<p class="blog_content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Iste mollitia repellat, possimus nesciunt aspernatur quisquam doloremque! Illo, debitis distinctio, nostrum voluptatum possimus minus odio quaerat quia fugit maiores porro. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate quas recusandae dolorum sunt porro vero, temporibus nesciunt cum, sint iure quis suscipit dignissimos maiores cumque debitis nihil, eveniet dolores nemo.</p>
|
|
<p class="blog_details"></p>
|
|
|
|
</section>
|
|
<section class="blog_post" id="sixth">
|
|
<button class="arrow"></button>
|
|
<h1 class="blog_title">Blog Title</h1>
|
|
<img class="blog_image" src="assets/images/profileImage.png"/>
|
|
<p class="blog_content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Iste mollitia repellat, possimus nesciunt aspernatur quisquam doloremque! Illo, debitis distinctio, nostrum voluptatum possimus minus odio quaerat quia fugit maiores porro. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate quas recusandae dolorum sunt porro vero, temporibus nesciunt cum, sint iure quis suscipit dignissimos maiores cumque debitis nihil, eveniet dolores nemo.</p>
|
|
<p class="blog_details"></p>
|
|
|
|
</section>
|
|
</section>
|
|
</main>
|
|
|
|
<footer>
|
|
© Joshua Perry 2022
|
|
</footer>
|
|
</body>
|
|
</html> |