Base Number Systems Honors Precalculus Mr. Velazquez 1
Our System: Base 10 When we express numbers, we do so using ten numerical characters which cycle every multiple of 10. The reason for this is simple: we have 10 fingers This is not the only way of expressing numbers; this is simply one particular way that we ve decided to use for convention If we had more or less than 10 fingers, our number system might look very different. 0 1 2 3 4 5 6 7 8 9 Next digit changes for every multiple of 10 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2
Our System: Base 10 A benefit of expressing numbers as a scrolling series of symbols is that we can express any number as a series of powers of the base. In number theory, a branch of mathematics that deals with the properties and relationships of numbers, we envision each number as the value of a polynomial function with positive integer coefficients, and with x equal to the base. For example: 13 = 1 10 1 + 3 10 0 = 10 + 3 571 = 5 10 2 + 7 10 1 + 1 10 0 = 500 + 70 + 1 2, 096 = 2 10 4 + 0 10 3 + 9 10 1 + 6 10 0 = 2,000 + 90 + 6 Note that the 10 0 terms here are the constant terms (because 10 0 = n 0 = 1) 3
General Statement Any positive whole number k can be expressed as the sum of a series of powers of any natural number base b. k = a n b n + a n 1 b n 1 + + a 2 b 2 + a 1 b + a 0 Where a n, a n 1,, a 2, a 1 and a 0 are all equal or greater than zero and are the numeric digits of k in base b. Much of our basic arithmetic relies on this simple fact. For instance: 212 + 573 = 2 10 2 + 1 10 + 2 + [5 10 2 + 7 10 + 3] 212 + 573 = 200 + 500 + 10 + 70 + 2 + 3 213 + 573 = 700 + 80 + 5 = 785 4
Base 2: Binary Numbers The simplest form of numeral system is binary, which uses a base of 2, and thus only requires 2 different symbols to express numbers. The symbols we use are 0 and 1. This system is ideal for computers, since they can only sense when a switch is ON (1) or OFF (0). 5 (Hope you remember your powers of two!)
Base 2: Converting to Binary 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Step 0: Write out the powers of two from right to left (you don t have to write the full number, just use 2 0, 2 1, etc.) then choose your number, which we will call x Example: Let s suppose x = 764 Step 1: From your list of powers of 2, find the highest power of 2 that is less than your number x, and circle that power Example: The highest power of 2 that is less than 764 is 2 9 = 512, so circle 2 9 on the list Step 2: Subtract that power of 2 from your number x. You will be left with a remainder, which we will call r 1 Example: r 1 = 764 512 = 252 6
Base 2: Converting to Binary 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Step 3: From your list of powers of 2, find the highest power of two that is less than your remainder r 1, and circle that power Example: The highest power of 2 less than 252 is 2 7 = 128, so circle 2 7 on the list Step 4: Repeat steps 2 and 3 for remainder r 1, circling and subtracting the largest possible powers of 2 until you have no more remainder (don t forget to circle the powers that you are subtracting!) Example: r 2 = r 1 2 7 = 252 128 = 124 r 3 = r 2 2 6 = 124 64 = 60 r 4 = r 3 2 5 = 60 32 = 28 r 5 = r 4 2 4 = 28 16 = 12 r 6 = r 5 2 3 = 12 8 = 4 r 7 = r 6 2 2 = 4 4 = 0 7
Base 2: Converting to Binary Step 5: You will now have a list of descending powers of 2, with some circled and some not circled. All you need to do now is write a 1 above each circled power and a 0 above each power that s not circled. (You do not need to do this for any powers greater than the highest one you used) Example: We used the powers 9, 7, 6, 5, 4, 3, and 2, but did not use 8, 1 and 0 1 0 1 1 1 1 1 1 0 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Step 6: This series of 1 s and 0 s is your number x, in binary form. Example: 764 10 = 1011111100 2 or alternatively, DEC 764 = BIN 1011111100 8
Base 2: Converting to Binary 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Convert the following numbers into binary: 52 10 433 10 9
Base 2: Converting from Binary To convert a number from binary to decimal is even easier. All we need to do is add up all the powers of two indicated by the 1 s. It might help to write the powers of two (from right to left, starting with zero) underneath each digit. 1 0 1 1 0 2 1 1 0 1 2 2 4 2 3 2 2 2 1 2 0 2 3 2 2 2 1 2 0 2 4 + 2 2 + 2 1 = 16 + 4 + 2 = 22 10 2 3 + 2 2 + 2 0 = 8 + 4 + 1 = 13 10 10
Base 2: Converting from Binary 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Convert the following binary numbers into decimal: 11011 2 1101010 2 11
Base 2: A Few More Things Don t forget to include 2 0 when considering your powers of two. The zero power is probably the most important power to include because in any base it equals 1, and without 1, we could only count in multiples of the base. Any number that is 1 less than a power of two will be represented in binary as a straight series of 1 s. These are called binary repunits. The binary repunits which happen to also be prime are part of a special category of prime numbers known as the Mersenne Primes. Any base system will have its own set of repunits (numbers that consist of a straight series of 1 s), as well as its own set of repunit primes. 12
Counting Binary on your Fingers By assigning a power of two to each finger, and using a system where each extended finger represents a 1 in binary, we can use our fingers to count all the way to 1023. 64 128 256 8 4 2 512 16 32 1 13
Counting Binary on your Fingers By assigning a power of two to each finger, and using a system where each extended finger represents a 1 in binary, we can use our fingers to count all the way to 1023. 14 Note: DO NOT TRY 132
Using Binary to Fool People 15
Base 2: Exit Ticket Part 1 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Convert the following numbers into or from binary: 1. 75 10 2. 127 10 3. 1001 2 4. 111111 2 16
Base 3: Ternary Numbers In base-3, not much has changed from base-2. We re now using three symbols (0, 1 and 2) to write our numbers instead of just two. The rules for this are exactly the same as for binary, except we are now also considering the multiplication of powers of 3. Because we re in base-3, we will never use a power of 3 more than twice. 2187 729 243 81 27 9 3 1 3 7 3 6 3 5 3 4 3 3 3 2 3 1 3 0 807 10 = 1 3 6 + 0 3 5 + 0 3 4 + 2 3 3 + 2 3 2 + 2 3 1 + 0(3 0 ) 807 729 = 78 78 2 27 = 24 24 2 9 = 6 17 = 1002220 3 6 2 3 = 0
Base 3: Ternary Numbers 2187 729 243 81 27 9 3 1 3 7 3 6 3 5 3 4 3 3 3 2 3 1 3 0 711 10 = 2 3 5 + 2 3 4 + 2 3 3 + 1 3 2 + 0 3 1 + 0(3 0 ) 711 2 243 = 225 9 1 9 = 0 225 2 81 = 63 63 2 27 = 9 = 222100 3 85 10 = 1 3 4 + 0 3 3 + 0 3 2 + 1 3 1 + 1(3 0 ) 85 1 81 = 4 4 1 3 = 1 1 1 1 = 0 18 = 10011 3
Base 3: Converting to Decimal Just like with binary numbers, a number in base 3 can be converted to base 10 simply by adding up the powers indicated. Label each digit from right to left with the corresponding powers of 3 (DON T FORGET ZERO!!), then add up the powers. 2 1 0 3 3 2 3 1 3 0 1 2 2 0 1 3 3 4 3 3 3 2 3 1 3 0 2 3 2 + 1 3 1 + 0 3 0 = 18 + 3 1 3 4 + 2 3 3 + 2 3 2 + 0 3 1 + 1 3 0 = 81 + 54 + 18 + 1 = 21 10 = 154 10 19
Using Ternary to Fool People Then of course, there s the Base 3 Card Trick It takes time and practice to get this trick right. Here s a link to an explanation by mathematician Matt Parker on how to do it properly: https://www.youtube.com/watch?v=l7lp9y7bb5g 20
Base 3: Exit Ticket Part 2 2187 729 243 81 27 9 3 1 3 7 3 6 3 5 3 4 3 3 3 2 3 1 3 0 Convert the following numbers to/from ternary: 5. 66 6. 10 935 10 7. 1212 8. 3 2001 3 21