- You had a reading: on-line
introduction to bases, so I'm going to assume that you've read
that.
I might even hope that you went out and found Little
Twelvetoes, so let's start there....
- Base Background
So far we've been busting up numbers in different ways, in
different cultures.
We might take a look now at our own culture. Consider the number
1729, and its base 10 representation.
When we say "Seventeen twenty nine", what do we mean?
What does each of the digits in the number 1729 mean?
- The story of base 10.
- Place value -- each power has its place.
- Other cultures use other bases (and ours uses other bases, as we
will see):
- What's the story of base 2 (Egyptians!)? Of base 8 (us!)?
Of base 20 (Mayans!)? Of base 60 (Babylonians!)?
- One of my favorite early introductions to bases was Tom Lehrer's New
Math, which informs us about base 8.
- The Great Fraudini writes numbers in base 2 -- that is, using powers of two.
How would Fraudini write these numbers?
|
47 |
= |
|
32 |
|
+8 |
+4 |
+2 |
+1 |
89 |
= |
64 |
|
+16 |
+8 |
|
|
+1 |
How would we write these numbers in base 2?
|
47 |
= |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
89 |
= |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
How can we understand this base-2 representation? In terms of
powers and their places, obviously!
-
Now: what do you get if you count using partitions the numbers
Amazing! My colleague Don Krug has recently given me a way of
visualizing the same process of "counting by partition", or
"primitive counting", and I want to share it with you. We might
call it "exploding sheep"...
- Let's do a few base 8 calculations. How about writing 173 (base
10) in base 8?
- Other bases are used constantly -- for example, in this web page. How so?
- To write a base 10 number in another base, say 7:
- First write out the powers of 7: 1, 7, 49, etc. Write powers until you are about to go past your number in size.
- Write them in increasing order, from right to left: so for a number smaller than 16807 (), we'd create this to start:
- Now use these powers as bills to make change for your number. Divide the largest bill you can use into the number given, and then use the largest number of those bills without exceeding the total (you don't want to overpay, for goodness sake!). Then "do it again" on the remainder you need to pay. You might use a tree, as we did in class, to do your accounting.
- Fill in the details in this example for 14239
- To write a number in some other base in base 10 (e.g. 7):
- Count the number of powers you'll need in your number. For example, if your number is 1642 you'll need powers of 7 from 0 to 3.
- First write out the powers needed: in this example, you'd need 1, 7, 49, and 343
- Now simply add up the products 1*343+6*49+4*7+2*1 = 667 (in base 10)
- Translating between other bases.
One strategy to is convert from the starting base to base 10, then to do
partition with a tree.
Here's an example: Convert 6257 to base 3.
- First convert 6257 to base 10: 31310
- Now convert 31310 to base 3: 1021213
- Finally your answer is
6257= 1021213
- Some more to try:
- Write 537 (written here in base 10) in base 2
- Write 537 (written here in base 10) in base 7
- Write 537 (written here in base 10) in base 60 -- this is what we do when we want to write a number in Babylonian.
- Now in the other direction:
- Write 100101 (written here in base 2) in base 10
- Write 100101 (written here in base 7) in base 10 (Hint: 1 7 49 343 2401 16807)
- Write 100101 (written here in base 16) in base 10 (Hint: 1 16 256 4096 65536 1048576)
- Write 22803 (written here in base 9) in base 10 (Hint: 1 9 81 729 6561)
- Now let's take a look at some sums in other bases: for that, the "exploding sheep" analogy is good:
- Let's add a couple of numbers, expressed in base 8:
- Next we'll have a look at adding some base 2 numbers: let's add three of them, like 1011011, 1101, and 111111
- Subtraction is a little hairer, but our sheep simply "unexplode"! Consider the following difference expressed in base 8:
- Finally let's see why multiplication is so nice in base 2. Multiply 10110 and 101.