Double-click the Local Area Connection icon.

thousands; and so on. These digits represent powers of ten: first 10 which is 1; next, 10 1 10; then 10 2 100; then 10 3 1,000; and so on. In binary, you have only two numerals rather than ten, which is why binary numbers look somewhat monotonous, as in 110011, 101111, and 100001. The positions in a binary number called bits rather than digits represent powers of two rather than powers of ten: 1, 2, 4, 8, 16, 32, and so on. To figure the decimal value of a binary number, you multiply each bit by its correspond- ing power of two and then add the results. The decimal value of binary 10101, for example, is calculated as follows: 1 _ 2 = 1 _ 1 = 1 + 0 _ 2 1 = 0 _ 2 = 0 + 1 _ 2 2 = 1 _ 4 = 4 + 0 _ 2 3 = 0 _ 8 = 0 + 1 _ 2 4 = 1 _ 16 = _16 21 Fortunately, converting a number between binary and decimal is something a computer is good at — so good, in fact, that you’re unlikely ever to need to do any conversions yourself. The point of learning binary is not to be able to look at a number such as 1110110110110 and say instantly, “Ah Decimal 7,606” If you could do that, Barbara Walters would probably interview you, and they would even make a movie about you — starring Dustin Hoffman and a vintage Buick. Instead, the point is to have a basic understanding of how computers store information and — most important — to understand how the hexadecimal counting system works which is described in the following section. Here are some of the more interesting characteristics of binary and how the system is similar to and differs from the decimal system: ⻬ The number of bits allotted for a binary number determines how large that number can be. If you allot eight bits, the largest value that number can store is 11111111, which happens to be 255 in decimal. ⻬ To quickly figure how many different values you can store in a binary number of a given length, use the number of bits as an exponent of two. An eight-bit binary number, for example, can hold 2 8 values. Because 2 8 is 256, an eight-bit number can have any of 256 different values — which is why a byte, which is eight bits, can have 256 different values. ⻬ This “powers-of-two” thing is why computers don’t use nice, even, round numbers in measuring such values as memory or disk space. A value of 1K, for example, is not an even 1,000 bytes — it’s 1,024 bytes because 1,024 is 2 10 . Similarly, 1MB is not an even 1,000,000 bytes, but rather is 1,048,576 bytes, which happens to be 2 20 . 332 Part V: TCPIP and the Internet Doing the logic thing One of the great things about binary is that it is very efficient at handling spe- cial operations called logical operations. Four basic logical operations exist, though additional operations are derived from the basic four operations. Three of the operations — AND, OR, and XOR — compare two binary digits bits. The fourth NOT works on just a single bit. The following list summarizes the basic logical operations: ⻬ AND: An AND operation compares two binary values. If both values are 1, the result of the AND operation is 1. If one or both of the values are 0, the result is 0. ⻬ OR: An OR operation compares two binary values. If at least one of the values is 1, the result of the OR operation is 1. If both values are 0, the result is 0. ⻬ XOR: An XOR operation compares two binary values. If exactly one of them is 1, the result is 1. If both values are 0 or if both values are 1, the result is 0. ⻬ NOT: The NOT operation doesn’t compare two values. Instead, it simply changes the value of a single binary value. If the original value is 1, NOT returns 0. If the original value is 0, NOT returns 1. Logical operations are applied to binary numbers that have more than one binary digit by applying the operation one bit at a time. The easiest way to do this manually is to line the two binary numbers on top of one another, and then write the result of the operation beneath each binary digit. The follow- ing example shows how you would calculate 10010100 AND 11001101: 10010100 AND 11011101 10010100 As you can see, the result is 10010100. Introducing IP Addresses An IP address is a number that uniquely identifies every host on an IP net- work. IP addresses operate at the Network layer of the TCPIP protocol stack, so they are independent of lower-level Data Link layer MAC addresses, such as Ethernet MAC addresses. IP addresses are 32-bit binary numbers, which means that theoretically, a maxi- mum of something in the neighborhood of 4 billion unique host addresses can 333

Chapter 24: Understanding IP Addresses