lkarch.org/tools/mathisfun/www.mathsisfun.com/binary-decimal-hexadecimal.html
Lucas Kent e39465ad2f Changes to be committed:
new file:   Files/flashplayer_32_sa.exe
	new file:   favicon.ico
	new file:   globe.gif
	new file:   imgs/download.png
	new file:   imgs/zuck.jpg
	new file:   index.html
	new file:   other.ico
	new file:   script.js
	new file:   site.webmanifest
	new file:   sitemap.html
	new file:   styles/backround.css
	new file:   styles/border.css
	new file:   styles/fonts/Titillium_Web/OFL.txt
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf
	new file:   styles/fonts/webfontkit-20221027-163353/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2
	new file:   styles/fonts/webfontkit-20221027-165950/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2
	new file:   styles/style.css
	new file:   tools/2048/.gitignore
	new file:   tools/2048/.jshintrc
	new file:   tools/2048/CONTRIBUTING.md
	new file:   tools/2048/LICENSE.txt
	new file:   tools/2048/README.md
	new file:   tools/2048/Rakefile
	new file:   tools/2048/favicon.ico
	new file:   tools/2048/index.html
	new file:   tools/2048/js/animframe_polyfill.js
	new file:   tools/2048/js/application.js
	new file:   tools/2048/js/bind_polyfill.js
	new file:   tools/2048/js/classlist_polyfill.js
	new file:   tools/2048/js/game_manager.js
	new file:   tools/2048/js/grid.js
	new file:   tools/2048/js/html_actuator.js
	new file:   tools/2048/js/keyboard_input_manager.js
	new file:   tools/2048/js/local_storage_manager.js
	new file:   tools/2048/js/tile.js
    new file:   tools/2048/meta/apple-touch-icon.png
	new file:   tools/webretro/cores/neocd_libretro.js
	new file:   tools/webretro/cores/neocd_libretro.wasm
	new file:   tools/webretro/cores/nestopia_libretro.js
	new file:   tools/webretro/cores/nestopia_libretro.wasm
	new file:   tools/webretro/cores/o2em_libretro.js
	new file:   tools/webretro/cores/o2em_libretro.wasm
	new file:   tools/webretro/cores/opera_libretro.js
	new file:   tools/webretro/cores/opera_libretro.wasm
2022-11-02 08:40:01 -04:00

412 lines
16 KiB
HTML

<!doctype html>
<html lang="en"><!-- #BeginTemplate "/Templates/Main.dwt" --><!-- DW6 -->
<!-- Mirrored from www.mathsisfun.com/binary-decimal-hexadecimal.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:35:24 GMT -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>Binary, Decimal and Hexadecimal Numbers</title>
<script src="numbers/images/number-odometer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="stylejs.css" />
<!-- #EndEditable -->
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="HandheldFriendly" content="true">
<meta http-equiv="pics-label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://www.mathsisfun.com" r (SS~~000 1))'>
<link rel="stylesheet" type="text/css" href="style3.css" />
<script src="main3.js" type="text/javascript"></script>
</head>
<body id="bodybg">
<div class="bg">
<div id="stt"></div>
<div id="hdr"></div>
<div id="logo"><a href="index.html"><img src="images/style/logo.svg" alt="Math is Fun" /></a></div>
<div id="gtran"><script type="text/javascript">document.write(getTrans());</script></div>
<div id="gplus"><script type="text/javascript">document.write(getGPlus());</script></div>
<div id="adTopOuter" class="centerfull noprint">
<div id="adTop">
<script type="text/javascript">document.write(getAdTop());</script>
</div>
</div>
<div id="adHide">
<div id="showAds1"><a href="javascript:showAds()">Show Ads</a></div>
<div id="hideAds1"><a href="javascript:hideAds()">Hide Ads</a><br>
<a href="about-ads.html">About Ads</a></div>
</div>
<div id="menuWide" class="menu">
<script type="text/javascript">document.write(getMenu(0));</script>
</div>
<div id="linkto">
<div id="linktort"><script type="text/javascript">document.write(getLinks());</script></div>
</div>
<div id="search" role="search"><script type="text/javascript">document.write(getSearch());</script></div>
<div id="menuSlim" class="menu">
<script type="text/javascript">document.write(getMenu(1));</script>
</div>
<div id="menuTiny" class="menu">
<script type="text/javascript">document.write(getMenu(2));</script>
</div>
<div id="extra"></div>
</div>
<div id="content" role="main"><!-- #BeginEditable "Body" -->
<h1 align="center">Binary, Decimal and Hexadecimal Numbers</h1>
<h2>Decimals</h2>
<p>How <i>do</i> <a href="decimals.html">Decimal Numbers</a> work?</p>
<p>Every digit in a decimal number has a &quot;position&quot;, and the <b>decimal point</b> helps us to know which position is which: </p>
<p align="center"><img src="numbers/images/decimal.svg" alt="decimal 17.591" /></p>
<p>The position <i>just to the left</i> of the point is the &quot;Ones&quot; position. If we see a &quot;7&quot; there we know it means 7 ones.</p>
<p>Every position further to the left is 10 times bigger, and every position further to the right is 10 times smaller</p>
<p>This is <b> just a way of writing down a value</b>. Other ways include <a href="roman-numerals.html">Roman Numerals</a>, <a href="binary-number-system.html">Binary</a>, <a href="hexadecimals.html">Hexadecimal</a>, and more. You could even just draw dots on a sheet of paper!</p>
<h2>Bases</h2>
<p>The Decimal Number System is also called &quot;Base 10&quot;, because it is based on the number 10, with these 10 symbols:</p>
<p class="center large">0, 1, 2, 3, 4, 5, 6, 7, 8 and 9</p>
<p>But notice something interesting: <b>there is no symbol for &quot;ten&quot;</b>. &quot;10&quot; is actually two symbols put together, a &quot;1&quot; and a &quot;0&quot;:</p>
<div class="center80">
<p>In decimal you count &quot;0,1,2,3,4,5,6,7,8,9,...&quot; but then you run out of symbols!</p>
<p>So you add <b>1 on the left</b> and then <b>start again at 0</b>: 10,11,12, ...</p>
</div>
Like this:
<div class="simple">
<table border="0" align="center">
<tr>
<td>&nbsp;</td>
<td align="right" class="large">0</td>
<td>&nbsp;</td>
<td>Start at 0 </td>
</tr>
<tr>
<td>&bull;</td>
<td align="right" class="large">1</td>
<td>&nbsp;</td>
<td>Then 1</td>
</tr>
<tr>
<td>&bull;&bull;</td>
<td align="right" class="large">2</td>
<td>&nbsp;</td>
<td>Then 2</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right" class="large">&#8942;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">9</td>
<td>&nbsp;</td>
<td>Up to 9</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">1</span>0</td>
<td>&nbsp;</td>
<td>Start back at 0 again, but add 1 on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;</td>
<td align="right" class="large">11</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;</td>
<td align="right" class="large">12</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right" class="large">&#8942;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">19</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">2</span>0</td>
<td>&nbsp;</td>
<td>Start back at 0 again, but add 1 on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;</td>
<td align="right" class="large">21</td>
<td>&nbsp;</td>
<td>And so on!</td>
</tr>
</table>
</div>
<h2>Counting with Different Number Systems</h2>
<p>But you don't <b>have to</b> use 10 as a &quot;Base&quot;. You could use 2 (&quot;Binary&quot;), 16 (&quot;Hexadecimal&quot;), or any number you want to!</p>
<div class="center80">
<p>Example: In binary you count &quot;0,1,...&quot; but then you run out of symbols!</p>
<p>So you add <b>1 on the left</b> and then <b>start again at 0</b>: 10,11 ...</p>
</div>
<p>&nbsp;</p>
<p>See how to count dots using Bases from 2 to 16 (press Play button):</p>
<script type="text/javascript">numberodometerMain(2);</script>
<p>&nbsp;</p>
<p style="float:right; margin: 0 0 9px 20px;"><img src="numbers/images/number-odometer1.gif" width="402" height="114" alt="number odometer" /><br>
<b>Example: 1&times;16 + 1&times;8 + 1&times;1 = 16+8+1 = 25</b></p>
<p>&nbsp;</p>
<p><i>Try&nbsp;this:</i> select a Base, watch it count for a while, then press &quot;||&quot; (Pause). Now see if it has tallied the right number of dots, as in this example using base 2.</p>
<p>&nbsp; </p>
<p>So the general rule is:</p>
<p class="center80"> Count up until just before the &quot;Base Number&quot;, then start at 0 again, but first you add 1 to the number on your left.</p>
<h2>Binary Numbers</h2>
<p><a href="binary-number-system.html">Binary Numbers</a> are just &quot;Base 2&quot; instead of &quot;Base 10&quot;. So you start counting at 0, then 1, then you run out of digits ... so you start back at 0 again, but increase the number on the left by 1.</p>
<p>Like this:</p>
<div class="simple">
<table border="0" align="center">
<tr>
<td>&nbsp;</td>
<td align="right" class="large">0</td>
<td>&nbsp;</td>
<td>Start at 0 </td>
</tr>
<tr>
<td>&bull;</td>
<td align="right" class="large">1</td>
<td>&nbsp;</td>
<td>Then 1</td>
</tr>
<tr>
<td>&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">1</span>0</td>
<td>&nbsp;</td>
<td>there is no &quot;2&quot; in binary, so start back at 0 ...<br />
... and add one to the number on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;</td>
<td align="right" class="large">11</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">1</span>00</td>
<td>&nbsp;</td>
<td>start back at 0 again, and add one to the number on the left...<br />
... but that number is already at 1 so it also goes back to 0 ...<br />
... and 1 is added to the <i>next position</i> on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">101</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">110</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">111</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">1</span>000</td>
<td>&nbsp;</td>
<td>Start back at 0 again (for all 3 digits), <br />
add 1 on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">1001</td>
<td>&nbsp;</td>
<td>And so on!</td>
</tr>
</table>
</div>
<h2>Hexadecimal Numbers</h2>
<p><a href="hexadecimals.html">Hexadecimal numbers</a> are interesting. There are 16 of them! </p>
<p>They look the same as the decimal numbers up to 9, but then there are the letters (&quot;A',&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;E&quot;,&quot;F&quot;) in place of the decimal numbers 10 to 15. </p>
<p>So a single Hexadecimal digit can show 16 different values instead of the normal 10 like this:</p>
<div class="simple">
<table border="0" align="center">
<tr align="center">
<th width="150">Decimal:</th>
<td width="21">0</td>
<td width="21">1</td>
<td width="21">2</td>
<td width="21">3</td>
<td width="21">4</td>
<td width="21">5</td>
<td width="21">6</td>
<td width="21">7</td>
<td width="21">8</td>
<td width="21">9</td>
<td width="21">10</td>
<td width="21">11</td>
<td width="21">12</td>
<td width="21">13</td>
<td width="21">14</td>
<td width="21">15</td>
</tr>
<tr align="center">
<th width="150">Hexadecimal:</th>
<td width="21">0</td>
<td width="21">1</td>
<td width="21">2</td>
<td width="21">3</td>
<td width="21">4</td>
<td width="21">5</td>
<td width="21">6</td>
<td width="21">7</td>
<td width="21">8</td>
<td width="21">9</td>
<td width="21">A</td>
<td width="21">B</td>
<td width="21">C</td>
<td width="21">D</td>
<td width="21">E</td>
<td width="21">F</td>
</tr>
</table>
</div>
<p>And we count in Hexadecimal like this:</p>
<div class="simple">
<table border="0" align="center">
<tr>
<td>&nbsp;</td>
<td align="right" class="large">0</td>
<td>&nbsp;</td>
<td>Start at 0 </td>
</tr>
<tr>
<td>&bull;</td>
<td align="right" class="large">1</td>
<td>&nbsp;</td>
<td>Then 1</td>
</tr>
<tr>
<td>&bull;&bull;</td>
<td align="right" class="large">2</td>
<td>&nbsp;</td>
<td>Then 2</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right" class="large">&#8942;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">F</td>
<td>&nbsp;</td>
<td>Up to F</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">1</span>0</td>
<td>&nbsp;</td>
<td>Start back at 0 again, but add 1 on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">11</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;</td>
<td align="right" class="large">12</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right" class="large">&#8942;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;</td>
<td align="right" class="large">1F</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;</td>
<td align="right" class="large"><span class="hilite">2</span>0</td>
<td>&nbsp;</td>
<td>Start back at 0 again, but add 1 on the left</td>
</tr>
<tr>
<td>&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;<br>
&bull;&bull;&bull;</td>
<td align="right" class="large">21</td>
<td>&nbsp;</td>
<td>And so on!</td>
</tr>
</table>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="questions">
<script type="text/javascript">getQ(2001, 2002, 2003, 2004, 2005, 2006);</script>&nbsp;
</div>
<div class="related">
<a href="decimals.html">Decimal Numbers</a>
<a href="binary-number-system.html">Binary Number System</a>
<a href="hexadecimals.html">Hexadecimal Number System</a>
<a href="binary-decimal-hexadecimal-converter.html">Binary, Decimal, Hexadecimal Converter</a>
<a href="games/hex-drums.html">Hexadecimal Drum Machine</a>
<a href="base-conversion-method.html">Base Conversion Method</a>
</div>
<!-- #EndEditable --></div>
<div id="adend" class="centerfull noprint">
<script type="text/javascript">document.write(getAdEnd());</script>
</div>
<div id="footer" class="centerfull noprint">
<script type="text/javascript">document.write(getFooter());</script>
</div>
<div id="copyrt">
Copyright &copy; 2017 MathsIsFun.com
</div>
<script type="text/javascript">document.write(getBodyEnd());</script>
</body>
<!-- #EndTemplate -->
<!-- Mirrored from www.mathsisfun.com/binary-decimal-hexadecimal.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:35:24 GMT -->
</html>