Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Understanding “disk space math”

#1
Understanding “disk space math”

<div><p>Everything in a PC, laptop, or server is represented as binary digits (a.k.a. <em>bits,</em> where each bit can only be 1 or 0). There are no characters like we use for writing or numbers as we write them anywhere in a computer’s memory or secondary storage such as disk drives. For general purposes, the unit of measure for groups of binary bits is the byte — eight bits. Bytes are an agreed-upon measure that helped standardize computer memory, storage, and how computers handled data.</p>
<p>There are various terms in use to specify the capacity of a disk drive (either magnetic or electronic). The same measures are applied to a computers random access memory (RAM) and other memory devices that inhabit your computer. So now let’s see how the numbers are made up.</p>
<p> <span id="more-29528"></span> </p>
<p>Suffixes are used with the number that specifies the capacity of the device. The suffixes designate a multiplier that is to be applied to the number that preceded the suffix. Commonly used suffixes are:</p>
<ul>
<li><span style="font-size: medium">Kilo = 10<sup>3</sup> = 1,000 (one thousand)</span></li>
<li><span style="font-size: medium">Mega = 10<sup>6</sup> = 1,000,000 (one million)</span></li>
<li><span style="font-size: medium">Giga = 10<sup>9</sup> = 1000,000,000 (one billion)</span></li>
<li><span style="font-size: medium">Tera = 10<sup>12</sup> = 1,000,000,000,000 (one trillion)</span></li>
</ul>
<p>As an example 500 GB (gigabytes) is 500,000,000,000 bytes.</p>
<p>The units that memory and storage are specified in&nbsp; advertisements, on boxes in the store, and so on are in the decimal system as shown above. However since computers only use binary bits, the actual capacity of these devices is different than the advertised capacity.</p>
<p>You saw that the decimal numbers above were shown with their equivalent powers of ten. In the binary system numbers can be represented as powers of two. The table below shows how bits are used to represent powers of two in an 8 bit Byte. At the bottom of the table there is an example of how the decimal number 109 can be represented as a binary number that can be held in a single byte of 8 bits (01101101).</p>
<table class="wp-block-table">
<tbody>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: large">Eight bit binary number</span></span></span></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 7</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 6</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 5</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 4</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 3</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 2</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 1</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Bit 0</span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Power of 2</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>7</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>6</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>5</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>4</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>3</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>2</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>1</sup></span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2<sup>0</sup></span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Decimal Value</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">128</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">64</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">32</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">16</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">8</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">4</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">2</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">1</span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">Example Number</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">0</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">1</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">1</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">0</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">1</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">1</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">0</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: medium">1</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p>The example bit values comprise the binary number 01101101. To get the equivalent decimal value just add the decimal values from the table where the bit is set to 1. That is 64 + 32 + 8 + 4 + 1 = 109.</p>
<p>By the time you get out to <span style="font-size: small">2</span><sup><span style="font-size: small">3</span></sup><sup><span style="font-size: small">0 </span></sup>you have decimal 1,073,741,824 with just 31 bits (don’t forget the <span style="font-size: small">2</span><sup><span style="font-size: small">0</span></sup>) You’ve got a large enough number to start specifying memory and storage sizes.</p>
<p>Now comes what you have been waiting for. The table below lists common designations as they are used for labeling decimal and binary values.</p>
<table class="wp-block-table">
<tbody>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: large">Decimal</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: large">Binary</span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">KB (Kilobyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1KB = 1,000 bytes</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">KiB (Kibibyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1KiB = 1,024 bytes</span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">MB (Megabyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1MB = 1,000,000 bytes</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">MiB (Mebibyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1MiB =&nbsp;<span class="ILfuVd NA6bn"><span class="e24Kjd">1,048,576</span></span> bytes</span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">GB (Gigabyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1GB = 1,000,000,000 bytes</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">GiB (Gibibyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1 GiB (Gibibyte) </span></span></span><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">= </span></span></span><span style="font-size: small">1,073,741,824</span> <span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">bytes</span></span></span></p>
</td>
</tr>
<tr>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">TB (Terabyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1TB = 1,000,000,000,000</span></span></span></p>
</td>
<td>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">TiB (Tebibyte)</span></span></span></p>
<p align="center"><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">1TiB =&nbsp;</span></span></span><span style="font-size: small">1,099,511,627,776 </span><span style="color: #000000"><span style="font-family: Liberation Serif, serif"><span style="font-size: small">bytes</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p>Note that all of the quantities of bytes in the table above are expressed as decimal numbers. They are not shown as binary numbers because those numbers would be more than 30 characters long.</p>
<p>Most users and programmers need not be concerned with the small differences between the binary and decimal storage size numbers. If you’re developing software or hardware that deals with data at the binary level you may need the binary numbers.</p>
<p><span style="font-size: medium">As for what this means to your PC: Your PC will make use of the full capacity of your storage and memory devices. If you want to see the capacity of your disk drives, thumb drives, etc, the Disks utility in Fedora will show you the actual capacity of the storage device in number of bytes as a decimal number.</span></p>
<p>There are also command line tools that can provide you with more flexibility in seeing how your storage bytes are being used. Two such command line tools are <a href="https://linux.die.net/man/1/du"><em>du</em></a> (for files and directories) and <a href="https://linux.die.net/man/1/df"><em>df</em></a> (for file systems). You can read about these by typing <em>man du</em> or <em>man df</em> at the command line in a terminal window.</p>
<hr class="wp-block-separator" />
<p><em>Photo by&nbsp;</em><a href="https://unsplash.com/@franckinjapan?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Franck V.</em></a><em>&nbsp;on&nbsp;</em><a href="https://unsplash.com/s/photos/math?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Unsplash</em></a>.</p>
</div>


https://www.sickgaming.net/blog/2019/11/...pace-math/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016