# Number Bases

Mathematical background necessary to understand binary logic. We will study:
Decimal, base 10
Binary, base 2
Octal, base 8

You will probably find this base conversion tool helpful in this lesson.
Decimal:
You may have noticed that many things are focused on the number 10 or powers of 10. One of these things is our common number system. You probably know that:

 10,000 1,000 100 10 1 238 = 0 0 2*100+ 3*10+ 8 5179 = 0 5*1000+ 1*100+ 7*10+ 9 20661 = 2*10000+ 0*1000+ 6*100+ 6*10+ 1

The decimal system is based upon the number 10. Each digit in a number symbolizes that digit multiplied by the base raised to the power of the digit's position. 238 means 2*102+3*101+8*100.
Note that when we assign numbers to position we begin with 0, and that a decimal number consists only of the following digits: 0,1,2,3,4,5,6,7,8,9

Binary:
The binary system is based upon the number 2. There are only two digits, 0 and 1

 64 32 16 8 4 2 1 4 = 0 0 0 0 1 0 0 19 = 0 0 1 0 0 1 1 113 = 1 1 1 0 0 0 1

1110001 means 1*2^6 + 1*2^5 + 1*2^4 + 0*2^3 + 0*2^2 + 0*2^1 + 1*2^0

Octal:
The octal system is based upon the number 8. There are eight digits, 0,1,2,3,4,5,6,7

 4096 512 64 8 1 238 = 0 0 3 5 6 5179 = 1 2 0 7 3 20661 = 5 0 2 6 5

50265 means 5*8^4 + 0*8^3 + 2*8^2 + 6*8^1 + 5*8^0