A number base is the number of digits in a given counting system. For instance, in our standard decimal base (that is, in the standard base10 number system), we have ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Content Continues Below
On the other hand, in the octal system (that is, in the base8 system), there are only eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. There is no digit "8" in the octal system. And in the hexidecimal system (that is, in the base16 system), there are sixteen digits: 0 through 9, followed by A, B, C, D, E, and F.
While the topic of different bases may seem somewhat pointless to you, the rise of computers and computer graphics has increased the need for knowledge of how to work with different, nondecimal base systems, particularly the binary system (consisting of just ones and zeroes) and the hexadecimal system.
We use the decimal number base, having ten digits; other number bases have their own names. For instance, the base11 number base is called the "undecimal" base; base12 is called "dozenal" (as in, "it has a dozen digits"). The base8 system is called "octal"; the base16 system is called "hexidecimal"; the base2 system is called "binary". Other numberbase systems have distinct names, too, and many of these other systems have been used, and some still to this day are still used, by various cultures and in various contexts.
Affiliate
Advertisement
In our customary baseten system, we have digits for the numbers zero through nine. We do not have a singledigit numeral for "ten". (The Romans did, in their character "X".) Yes, we can write the number "10", but this stands for "1 ten and 0 ones". This is two digits — a 1 and a 0. We have no single solitary digit that stands for "ten".
Instead, when we need to count to one more than nine, we zero out the ones column and add one to the tens column. When we get too big in the tens column — when we need one more than nine tens and nine ones (which is written as "99"), we zero out the tens and ones columns, and add one to the tentimesten, or hundreds, column. The next column is the tentimestentimesten, or thousands, column. And so forth, with each bigger column being ten times larger than the one before. We place digits in each column, telling us how many copies of that power of ten we need.
The only reason baseten math seems "natural" to you — and the other bases don't — is that you've been doing baseten since you were a child. And (nearly) every civilization has used baseten math probably for the simple reason that we have ten fingers. If instead we lived in a cartoon world, where we would have only four fingers on each hand (count them next time you're watching TV or reading the comics), then the "natural" base system would likely have been baseeight, or "octal".
Binary numbers are numbers which are written in the binary, or basetwo, number system. The only digits in the binary system are 0 and 1. Binary numbers are, as you're probably aware, the lifeblood of computers; at the most basic level, computers operate by shuffling zeroes and ones.
Let's look at basetwo, or binary, numbers. How would you write, for instance, 12_{10} ("twelve, base ten") as a binary number? You would have to convert to basetwo columns, the analogue of baseten columns. In base ten, you have columns or "places" for 10^{0} = 1, 10^{1} = 10, 10^{2} = 100, 10^{3} = 1000, and so forth. Similarly in base two, you have columns or "places" for 2^{0} = 1, 2^{1} = 2, 2^{2} = 4, 2^{3} = 8, 2^{4} = 16, and so forth.
The first column in basetwo math is the units column. But only 0 or 1 can go in the units column. When you get to "two", you find that there is no single solitary digit that stands for "two" in basetwo math. Instead, you put a 1 in the twos column and a 0 in the units column, indicating "1 two and 0 ones". The baseten "two" (2_{10}) is written in binary as 10_{2}.
The number "three" in base two is actually "1 two and 1 one", so it is written in binary as 11_{2}. "Four" is actually twotimestwo, so we zero out the twos column and the units column, and put a 1 in the fours column; 4_{10} is written in binary form as 100_{2}. Here is a listing of the first few numbers in their binary form:
← swipe to view full table →
decimal 
binary 

0 
0 
0 ones 
1 
1 
1 one 
2 
10 
1 two and zero ones 
3 
11 
1 two and 1 one 
4 
100 
1 four, 0 twos, and 0 ones 
5 
101 
1 four, 0 twos, and 1 one 
6 
110 
1 four, 1 two, and 0 ones 
7 
111 
1 four, 1 two, and 1 one 
8 
1000 
1 eight, 0 fours, 0 twos, and 0 ones 
9 
1001 
1 eight, 0 fours, 0 twos, and 1 ones 
10 
1010 
1 eight, 0 fours, 1 two, and 0 ones 
11 
1011 
1 eight, 0 fours, 1 two, and 1 one 
12 
1100 
1 eight, 1 four, 0 twos, and 0 ones 
13 
1101 
1 eight, 1 four, 0 twos, and 1 one 
14 
1110 
1 eight, 1 four, 1 two, and 0 ones 
15 
1111 
1 eight, 1 four, 1 two, and 1 one 
16 
10000 
1 sixteen, 0 eights, 0 fours, 0 twos, and 0 ones 
Content Continues Below
Converting between binary and decimal numbers is fairly simple, as long as you remember that each digit in the binary number represents a power of two.
I will list the digits in order, as they appear in the number they've given me. Then, in another row, I'll count these digits off from the RIGHT, starting with zero:
digits: 
1 
0 
1 
1 
0 
0 
1 
0 
1 
numbering: 
8 
7 
6 
5 
4 
3 
2 
1 
0 
The first row above (labelled "digits") contains the digits from the binary number; the second row (labelled "numbering") contains the power of 2 (the base) corresponding to each digit. I will use this listing to convert each digit to the power of two that it represents:
1×2^{8} + 0×2^{7} + 1×2^{6} + 1×2^{5} + 0×2^{4} + 0×2^{3} + 1×2^{2} + 0×2^{1} + 1×2^{0}
= 1×256 + 0×128 + 1×64 + 1×32 + 0×16 + 0×8 + 1×4 + 0×2 + 1×1
= 256 + 64 + 32 + 4 + 1
= 357
Then 101100101_{2} converts to 357_{10}.
Converting decimal numbers to binaries is nearly as simple: just divide by 2.
To do this conversion, I need to divide repeatedly by 2, keeping track of the remainders as I go. Watch below:
The above graphic is animated on the "live" web page.
As you can see, after dividing repeatedly by 2, I ended up with these remainders:
These remainders tell me what the binary number is. I read the numbers from around the outside of the division, starting on top with the final value and its remainder, and wrapping my way around and down the righthand side of the sequential division. Then:
357_{10} converts to 101100101_{2}.
Affiliate
This method of conversion will work for converting to any nondecimal base. Just don't forget to include that first digit on the top, before the list of remainders. If you're interested, an explanation of why this method works is available here.
You can convert from baseten (decimal) to any other base. When you study this topic in class, you will probably be expected to convert numbers to various other bases, so let's look at a few more examples...
URL: https://www.purplemath.com/modules/numbbase.htm
© 2024 Purplemath, Inc. All right reserved. Web Design by