Difference between revisions of "Base numbers"

m (Intermediate: fixed internal link)
m (Example Problems)
 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
== Introduction ==
+
To understand the notion of '''base numbers''', we look at our own [[number system]].  We use the [[decimal]], or base-10, number system.  To help explain what this means, consider the number 2746.  This number can be rewritten as <math>2746_{10}=2\cdot10^3+7\cdot10^2+4\cdot10^1+6\cdot10^0.</math>
To understand the notion of base numbers, we look at our own number system.  We use the '''decimal''', or base-10, number system.  To help explain what this means, consider the number 2746.  This number can be rewritten as <center><math>\displaystyle 2746_{10}=2\cdot10^3+7\cdot10^2+4\cdot10^1+6\cdot10^0.</math></center>
 
  
Note that each number in 2746 is actually just a placeholder which shows how many of a certain power of 10 there are.  The first digit to the left of the decimal place (recall that the decimal place is to the right of the 6, i.e. 2746.0) tells us that there are six <math>10^0</math>'s, the second digit tells us there are four <math>10^1</math>'s, the third digit tells us there are seven <math>10^2</math>'s, and the fourth digit tells us there are two <math>\displaystyle 10^3</math>'s.
+
Note that each number in 2746 is actually just a placeholder which shows how many of a certain power of 10 there are.  The first digit to the left of the decimal place (recall that the decimal place is to the right of the 6, i.e. 2746.0) tells us that there are six <math>10^0</math>'s, the second digit tells us there are four <math>10^1</math>'s, the third digit tells us there are seven <math>10^2</math>'s, and the fourth digit tells us there are two <math>10^3</math>'s.
  
 
Base-10 uses digits 0-9.  Usually, the base, or '''radix''', of a number is denoted as a subscript written at the right end of the number (e.g. in our example above, <math>2746_{10}</math>, 10 is the radix).
 
Base-10 uses digits 0-9.  Usually, the base, or '''radix''', of a number is denoted as a subscript written at the right end of the number (e.g. in our example above, <math>2746_{10}</math>, 10 is the radix).
  
=== Converting between bases ===
 
==== Converting from base b to base 10 ====
 
The next natural question is: how do we convert a number from another base into base 10?  For example, what does <math>4201_5</math> mean?  Just like base 10, the first digit to the left of the decimal place tells us how many <math>5^0</math>'s we have, the second tells us how many <math>5^1</math>'s we have, and so forth.  Therefore:
 
  
<center><math>\displaystyle 4201_5 = (4\cdot 5^3 + 2\cdot 5^2 + 0\cdot 5^1 + 1\cdot 5^0)_{10}</math></center>
+
== Base Number Topics ==
<center><math>=4\cdot 125 + 2\cdot 25 + 1</math></center>
+
* [[base numbers/Common bases | Common bases]]
<center><math>= 551_{10}</math></center>
+
* [[base numbers/Conversion | Converting between bases]]
 +
* [[Improper fractional base]]
  
From here, we can generalize.  Let <math>x=(a_na_{n-1}\cdots a_1a_0)_b</math> be an <math>\displaystyle n</math>-digit number in base <math>b</math>.  In our example (<math> 2746_{10}</math>) <math>a_3 = 2, a_2 = 7, a_1 = 4</math> and <math>\displaystyle a_0 = 6 </math>.  We convert this to base 10 as follows:
+
== History ==
  
<center><math> x = (a_na_{n-1}\cdots a_1a_0)_b</math></center>
+
Base-10 is an apparently obvious counting system because people have 10 fingers.  Historically, different societies utilized other systems.  The  Babylonian cultures are known to have used base-60; this is why we say there are 360 degrees in a circle and (fact check on this one coming) why we count 60 minutes in an hour and 60 seconds in a minute (they might have used it because it has so many multiples, 12 in fact, we wouldn't want any fractions).  The [[Roman system]], which didn't have any base system at all, used certain letters to represent certain values (e.g. I=1, V=5, X=10, L=50, C=100, D=500, M=1000).  Imagine how difficult it would be to multiply LXV by MDII!  That's why the introduction of the '''Arabic numeral system''', base-10, revolutionized math and science in Europe.
<center><math>  = (b^n\cdot a_n + b^{n-1}\cdot a_{n-1}+\cdots + b\cdot a_1 + a_0)_{10}</math></center>
 
  
==== Converting from base 10 to base b ====
+
== Example Problems ==
 +
=== Beginner ===
 +
*Evaluate <math>\sqrt{61_{8}}</math> as a number in the decimal system.
 +
**Solution: <math>61_{8}</math> must be rewritten in the decimal system (base-10) before evaluating the square root. To do this, multiply and add <math>6\cdot 8^1+1\cdot 8^0=48+1=49.  \sqrt{49}=7.</math> Therefore, the answer is 7.
  
It turns out that converting from base 10 to other bases is far harder for us than converting from other bases to base 10.  This shouldn't be a suprise, though.  We work in base 10 ''all the time'' so we are naturally less comfortable with other bases.  Nonetheless, it is important to understand how to convert from base 10 into other bases.
 
  
We'll look at two methods for converting from base 10 to other bases.
+
Find the base 2 number that is equivalent to <math>42_7</math>
  
===== Method 1 =====
+
=== Intermediate ===
 
+
* [[2003_AIME_I_Problems/Problem_13 | 2003 AIME I Problem 13]]
Let's try converting 1000 base 10 into base 7.  Basically, we are trying to find the solution to the equation
+
* [[1977_Canadian_MO_Problems/Problem_3 | Canadian Mathematics Olympiad Problem 3]]
 
+
* Suppose <math>P(x)</math> is an unknown polynomial, of unknown degree, with nonnegative integer coefficients. Your goal is to determine this polynomial. You have access to an oracle that, given an integer <math>n</math>, spits out <math>P(n)</math>, the value of the polynomial at <math>n</math>. However, the oracle charges a fee for each such computation, so you want to minimize the number of computations you ask the oracle to do. Show that it is possible to uniquely determine the polynomial after only two consultations of the oracle. ([http://www.math.uiuc.edu/~hildebr/pow/pow10.pdf UIUC POW])
<center><math> 1000 = a_0 + 7a_1 + 49a_2 + 343a_3+3401a_4+\cdots</math></center>
 
 
 
where all the <math>\displaystyle a_i</math> are digits from 0 to 6.  Obviously, all the <math>\displaystyle a_i</math> from <math>a_4</math> and up are 0 since otherwise they will add in a number greater than 1000, and all the terms in the sum are nonnegative. Then, we wish to find the largest <math>a_3</math> such that <math>343a_3</math> does not exceed 1000. Thus, <math> a_3= 2</math> since <math>2a_3=686</math> and <math>3a_3=1029</math>. This leaves us with
 
 
 
<center><math> 1000 = a_0 + 7a_1 + 49 a_2 + 343(2)\Leftrightarrow 314 = a_0 + 7a_1 + 49 a_2.</math></center>
 
  
Using similar reasoning, we find that <math>a_2 = 6</math>, leaving us with
+
== Resources ==
 +
==== Books ====
 +
* The AoPS [http://www.artofproblemsolving.com/Books/AoPS_B_Item.php?page_id=10 Introduction to Number Theory] by [[Mathew Crawford]].
 +
==== Classes ====
 +
* [http://www.artofproblemsolving.com/Classes/AoPS_C_ClassesS.php#begnum AoPS Introduction to Number Theory Course]
  
<center><math>20 = a_0 + 7a_1.</math></center>
 
 
We use the same procedure twice more to get that <math>a_1=2</math> and <math>\displaystyle a_0=6</math>.
 
 
Finally, we have that <math>1000_{10}=2626_7</math>.
 
 
An alternative version of method 1 is to find the "digits" <math>a_0,a_1,\dots</math> starting with <math>a_0</math>. Note that <math>a_0</math> is just the [[remainder]] of division of <math>1000</math>
 
by <math>7</math>. So, to find it, all we need to do is to carry out one division with remainder. We have <math>1000:7=142(R6)</math>. How do we find <math>a_1</math>, now? It turns out that all we need to do is to find the remainder of the division of the quotient <math>142</math> by <math>7</math>:
 
<math>142:7=20(R2)</math>, so <math>a_1=2</math>. Now, <math>20:7=2(R6)</math>, so <math>a_3=6</math>. Finally, <math>2:7=0(R2)</math>, so <math>a_4=2</math>. We may continue to divide beyond this point, of course, but it is clear that we will just get <math>0:7=0(R0)</math> during each step.
 
 
Note that both versions of this method use computations in base <math>10</math>.
 
 
It's often a good idea to double check by converting your answer back into base 10, since this conversion is easier to do.  We know that <math>2626_7=343\cdot 2 + 6\cdot 49 + 2\cdot 7 + 6=1000</math>, so we can rest assured we got the right answer.
 
 
===== Method 2 =====
 
We'll exhibit the second method with the same problem used to exhibit the first method.
 
 
The second method is just like how we converted from other bases into base 10.  To do this, we pretend that our standard number system is base 7.  In base 7, however, there is no digit 7.  So 7 is actually represented as 10!  Also, the multiplication rules we know do not hold.  For example, <math>\displaystyle 3\cdot 3\neq 9</math> (in base 7).  For one, there is no 9 in base 7.  Second, we need to go back to the definition of multiplication to fully understand what's happening.  Multiplication is a shorthand for repeated addition.  So, <math>\displaystyle 3\cdot 3 = 3 + 3 + 3 = 12_7</math>.
 
 
In base 7, we have that 10 (the decimal number 10) is 13.  Thus, if we view everything from base 7, we are actually converting <math>1000_{13}</math> to base 10.  So, this is just <math>\displaystyle 13^{3}</math>.  Remember that we aren't doing this in our regular decimal system, so <math>13^3\neq 2197</math>.  Instead, we have to compute <math>13\times 13\times 13</math> as <math>(13\times13)\times 13=202\times 13=2626</math>.
 
 
This method can be ''very'' confusing unless you have a very firm grasp on the notion of number systems.
 
 
== Common bases ==
 
Commonly used bases are 2, 8, 10 (duh!) and 16. The base doesn't necesarily have to be an integer. There are [[complex base | complex]], [[irrational base | irrational]], [[negative base | negative]], [[improper fractional base | fractional]], and many other kinds of bases. The best known one is [[phinary]], which is base [[phi]]; others include "Fibonacci base" and base negative two.
 
 
=== Binary ===
 
Binary is base 2.  It's a favorite among computer programmers. It has just two digits: <math>0</math> and <math>1</math>.
 
 
===Octal ===
 
Octal is base 8. It was also quite liked by programmers because the octal representation of numbers is 3 times shorter than the binary one and the conversion from octal to binary and back is very easy (can you guess why?). Besides, 8 is quite close to 10 and less than 10, so to learn doing addition and multiplication in base 8 is not very hard: you can basically count in base 10 with partial conversions to base 8 on the way. Let's multiply <math>12345_8</math> by <math>7_8</math>. <math>5\cdot 7=35_{10}=43_8</math> (to get the last result, just divide <math>35</math> by <math>8</math> with remainder). As usual, we write  the last digit <math>3</math> down and keep <math>4</math> in mind. Now, <math>4\cdot 7+4=32_{10}=40_8</math>, so we write down <math>0</math>, getting <math>03</math>, and keeping <math>4</math> in mind.
 
And so on. The time needed to get the answer <math>111103_8</math> only marginally exceeds the time of decimal multiplication (if you are good in division by 8 with remainder, of course).
 
 
=== Decimal ===
 
Decimal is base 10.  It's the base that everyone knows and loves.  Most numbers in the world are written without a specified radix and  usually it can just be assumed that they are in base 10.  The most commonly used explanation for the origin of base 10 for our number system is the number of fingers we have.
 
 
=== Hexadecimal ===
 
Hexadecimal is base 16.  The digits in hexadecimal are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.  One of its common uses is for color charts. Hexadecimal numbers are also used by programmers in the same way as octal numbers, but to learn to count in hexadecimal is harder than in octal.
 
 
 
== History ==
 
 
Base-10 is an apparently obvious counting system because people have 10 fingers.  Historically, different societies utilized other systems.  The  Native American cultures are known to have used base-60; this is why we say there are 360 degrees in a circle and (fact check on this one coming) why we count 60 minutes in an hour and 60 seconds in a minute.  The Roman system (internal link w/explanation?), which didn't have any base system at all, used certain letters to represent certain values (e.g. I=1, V=5, X=10, L=50, C=100, D=500, M=1000).  Imagine how difficult it would be to multiply LXV by MDII!  That's why the introduction of the '''Arabic numeral system''', base-10, revolutionized math and science in Europe.
 
 
 
== Example Problems ==
 
=== Intermediate ===
 
* [[1977_Canadian_MO_Problems/Problem_3 1977 | Canadian Mathematics Olympiad Problem 3]]
 
  
 
== See Also ==
 
== See Also ==

Latest revision as of 16:23, 30 December 2020

To understand the notion of base numbers, we look at our own number system. We use the decimal, or base-10, number system. To help explain what this means, consider the number 2746. This number can be rewritten as $2746_{10}=2\cdot10^3+7\cdot10^2+4\cdot10^1+6\cdot10^0.$

Note that each number in 2746 is actually just a placeholder which shows how many of a certain power of 10 there are. The first digit to the left of the decimal place (recall that the decimal place is to the right of the 6, i.e. 2746.0) tells us that there are six $10^0$'s, the second digit tells us there are four $10^1$'s, the third digit tells us there are seven $10^2$'s, and the fourth digit tells us there are two $10^3$'s.

Base-10 uses digits 0-9. Usually, the base, or radix, of a number is denoted as a subscript written at the right end of the number (e.g. in our example above, $2746_{10}$, 10 is the radix).


Base Number Topics

History

Base-10 is an apparently obvious counting system because people have 10 fingers. Historically, different societies utilized other systems. The Babylonian cultures are known to have used base-60; this is why we say there are 360 degrees in a circle and (fact check on this one coming) why we count 60 minutes in an hour and 60 seconds in a minute (they might have used it because it has so many multiples, 12 in fact, we wouldn't want any fractions). The Roman system, which didn't have any base system at all, used certain letters to represent certain values (e.g. I=1, V=5, X=10, L=50, C=100, D=500, M=1000). Imagine how difficult it would be to multiply LXV by MDII! That's why the introduction of the Arabic numeral system, base-10, revolutionized math and science in Europe.

Example Problems

Beginner

  • Evaluate $\sqrt{61_{8}}$ as a number in the decimal system.
    • Solution: $61_{8}$ must be rewritten in the decimal system (base-10) before evaluating the square root. To do this, multiply and add $6\cdot 8^1+1\cdot 8^0=48+1=49.  \sqrt{49}=7.$ Therefore, the answer is 7.


Find the base 2 number that is equivalent to $42_7$

Intermediate

  • 2003 AIME I Problem 13
  • Canadian Mathematics Olympiad Problem 3
  • Suppose $P(x)$ is an unknown polynomial, of unknown degree, with nonnegative integer coefficients. Your goal is to determine this polynomial. You have access to an oracle that, given an integer $n$, spits out $P(n)$, the value of the polynomial at $n$. However, the oracle charges a fee for each such computation, so you want to minimize the number of computations you ask the oracle to do. Show that it is possible to uniquely determine the polynomial after only two consultations of the oracle. (UIUC POW)

Resources

Books

Classes


See Also