-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d60f7fb
commit af4d6d1
Showing
3 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../../main.css"> | ||
<link rel="stylesheet" href="../main.css"> | ||
|
||
<title>Computer Science Revision</title> | ||
|
||
<link rel="icon" type="image/png" href="../icons/logo.svg"/> | ||
<meta property="og:image" content="../icons/logo.png" /> | ||
<meta property="og:image:width" content="640" /> | ||
<meta property="og:image:height" content="512" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content="2B.08 - Translators | Computer Science Revision"> | ||
</head> | ||
|
||
<body> | ||
<h1>3.01 – Storage Units</h1> | ||
<h3 class="home-link"><a href="../">Computer Science Revision</a></h3> | ||
<br /> | ||
|
||
<a class="prev-link" href="../2B-Summary-Questions/">Previous: Section 2B Summary Questions</a> | ||
<br /> <br /> | ||
|
||
<p class="definition"> | ||
<img src="../icons/book.svg" class="icon" /> | ||
The <strong>binary number system</strong> is a way of writing numbers with only 1s and 0s. | ||
</p> | ||
|
||
<p><b>Everything on a computer (text, images, apps, etc.) is stored in binary.</b></p> | ||
|
||
<p> | ||
Computers use 1s and 0s to represent ON and OFF: <br /> | ||
  1 means the electricity is flowing (ON) <br /> | ||
  0 means the electricity isn't flowing (OFF) | ||
</p> | ||
|
||
<p><br /> | ||
A single <b>bi</b>nary digi<b>t</b> (either a 1 or a 0) is called a <b>bit</b>. <br /> | ||
A group of four bits is called a <b>nibble</b>, and a group of eight bits (or two nibbles) is called a <b>byte</b>. | ||
</p> | ||
|
||
<p><br />Just like 1000 metres is a <b>kilo</b>metre, 1000 bytes is a <b>kilo</b>byte.<br /> </p> | ||
|
||
<p>Table 1 shows the more common prefixes used when describing memory usage.</p> | ||
|
||
<p class="table"> | ||
<img src="../icons/table.svg" class="icon" /> | ||
Table 1 | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<th><strong>Unit</strong></th> | ||
<th><strong>Number of bytes</strong></th> | ||
</tr> | ||
<tr> | ||
<td> | ||
Kilobyte <i>(kB)</i> | ||
</td> | ||
<td> | ||
<code>10<sup>3</sup></code> = 1,000 bytes | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Megabyte <i>(MB)</i> | ||
</td> | ||
<td> | ||
<code>10<sup>6</sup></code> = 1,000,000 bytes | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Gigabyte <i>(GB)</i> | ||
</td> | ||
<td> | ||
<code>10<sup>9</sup></code> = 1,000,000,000 bytes | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Terabyte <i>(TB)</i> | ||
</td> | ||
<td> | ||
<code>10<sup>12</sup></code> = 1,000,000,000,000 bytes | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<br /> | ||
|
||
<p>Table 2 shows the less common prefixes used when describing memory usage.</p> | ||
|
||
<p class="table"> | ||
<img src="../icons/table.svg" class="icon" /> | ||
Table 2 | ||
</p> | ||
|
||
<table> | ||
<tr> | ||
<th><strong>Unit</strong></th> | ||
<th><strong>Number of bytes</strong></th> | ||
</tr> | ||
<tr> | ||
<td> | ||
Kibibyte <i>(KiB)</i> | ||
</td> | ||
<td> | ||
<code>2<sup>10</sup></code> = 1,024 bytes | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Mebibyte <i>(MiB)</i> | ||
</td> | ||
<td> | ||
<code>2<sup>20</sup></code> = 1,048,576 bytes | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Gibibyte <i>(GiB)</i> | ||
</td> | ||
<td> | ||
<code>2<sup>30</sup></code> = 1,073,741,824 bytes | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Tebibyte <i>(TiB)</i> | ||
</td> | ||
<td> | ||
<code>2<sup>40</sup></code> = 1,099,511,627,776 bytes | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<br /> | ||
|
||
<hr /> | ||
|
||
<p class="question"> | ||
<img src="../icons/question.svg" class="icon" /> | ||
If each bit can take 2 possible values (1 or 0), how many possible values can a nibble take? | ||
</p> | ||
|
||
<p class="spoiler noselect"> | ||
<el class="default">Tap/click to reveal</el> | ||
<el class="answer"> | ||
Each bit in the nibble can take 2 possible values, so the nibble can take <code>2<sup>4</sup> = 2 × 2 × 2 × 2</code> = 16 possible values. | ||
</el> | ||
</p> | ||
|
||
<br /> | ||
|
||
<hr /> | ||
|
||
<br /> <br /> | ||
|
||
<div id="sub">© Rujul Nayak <el id="year">2024-</el></div> | ||
<script src="../../year.js"></script> | ||
|
||
<script src="../spoilers.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters