The Numbers Game
Like so many things in life, numbers are more complicated than initially meets the eye. IP addresses, in particular, are much more complicated than they appear. To truly appreciate them, you need to understand not one, but two number systems!What's a number system, you ask? A number system is an organized approach to identifying mathematical values. A number system includes such features as a set of symbols and a standard means of correlating each symbol with a specific value. In the case of IP addresses, the address is an easy way to represent a much larger and harder to remember binary number. Done right, a number system with any symbols can represent literally every possible number from negative infinity to 0 to positive infinity, and every number in between. That might sound like a tall order, but number systems are remarkably simple. After you establish the symbols and their corresponding values, the rest builds on that basic foundation.To understand IP addresses, you need a solid grasp of both the Base10 and Base2 number systems. Those names are just fancy ways of telling you how many symbols form the basis of each system. The Base10 system has 10 symbols, whereas the Base2 system has just 2. Yet, each is equally capable of symbolizing any given mathematical value. The only difference is one of efficiency. After reading the following sections you have all the tools you need to better understand IP addresses.Before you get too far into the numbers game, it might not be a bad idea to become familiar with IP addresses. How do you find yours?
Finding Your IP Address
Figuring out which IP address your computer uses is remarkably easy to do. Despite how easily you can accomplish this, few people other than network or system administrators ever do so. The reason is simple: TCP/IP works so well and seamlessly that you don't have to worry about minute details.If curiosity ever gets the best of you, you can run a command called ipconfig from within an MS-DOS window. It tells you which IP address your computer uses. Open an MS-DOS window to run this utility. From most modern Windows operating systems, you can open a DOS window by clicking the Start button in the lower left of your screen, scrolling your mouse pointer upward until you highlight Programs, and then selecting MS-DOS Prompt. This is illustrated in Figure 6-6, which shows a Windows 98 operating system.
Figure 6-6. Opening an MS-DOS Window
[View full size image]

Figure 6-7. Running the ipconfig Command
[View full size image]

All three pieces of information have a similar format: four decimal numbers separated by dots. This format is known as dotted quad. However, only two of these octets are IP addresses. The first is your computer's IP address. This is the address it uses when communicating over a network. The ipconfig report's other valid IP address is the third one. That's the IP address of your computer's default gateway. A default gateway is a network device that your computer relies upon to figure out how to find any and all other computers in the network. So, it's extremely important for your computer to know the address of this machine!Chapter 7, "More Fun with IP Addresses."
Decimal Numbers
If you are like most people, you think naturally in the Base10, or decimal number system. Most humans have 10 fingers and 10 toes, so it seems natural to seldom think about other number systems. Base10 is easy to understand; only 10 symbols identify all numeric values.These symbols are used in the decimal number system: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Virtually every possible number can be represented using just these symbols. You might need them in different combinations, and you might need a lot of them, but you can identify every possible mathematical value using only these symbols.The key to making this small set of symbols so scalable lies in the architecture of the decimal number system. The actual value represented by each symbol can only be determined by its position. For example, the number 2 can be 2 or it can be 2 groups of 10 (depending on where in the number each symbol is positioned).Table 6-1 better explains how a symbol's value can vary based on its position in a number. The number dissected in this example is 123. That's actually shorthand notation for 1 group of 10 raised to the second power (which equals 100), 2 groups of 10 raised to the first power (which equals 10), and 3 groups of 10 raised to the zero power (which equals 1). Say it another way: You have 1 group of 100, plus 2 groups of 10, plus 3 groups of 1 for a grand total of 123.
Powers of 10 | 102 | 101 | 100 |
---|---|---|---|
Column Value | 100 | 10 | 1 |
Symbol | 1 | 2 | 3 |
Binary Numbers
As natural as it is to think using Base10 numbers, it is every bit as logical for computers to "think" in the Base2, or binary number system. Computers are electrical devices. Literally everything they do is done with 1s and 0s. More specifically, each 1 is a momentary electrical current and each 0 is the absence of such a current. A 1 and 0 are the only symbols available in the Base2 number system. How on earth could you count to infinity using just two symbols? That's not as tough as you might think. The only problem is that with so few symbols you need more of them to symbolize any given number!To better show this, take a look at converting the decimal number 123 into binary. Instead of using columns that identify powers of 10, Base2 uses columns that identify powers of 2. Table 6-2 shows the powers of 2 up to 2 to the eighth power using the decimal number 123 as an example.
Powers of 2 | 8th | 7th | 6th | 5th | 4th | 3rd | 22 | 21 | 20 |
---|---|---|---|---|---|---|---|---|---|
Decimal Value | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Binary Symbol | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |
|