Bits, Bytes, and Measurement Terms 29 To convert from hexadecimal to binary, convert every hex digit into 4 bits. For example, to convert hex AC (0xAC) to binary, you first convert hex A, which is 1010 binary, and then you convert hex C, which is 1100 binary. So hex AC is 10101100 in binary. Notice that all possible combinations of four binary digits have only one hexadecimal symbol, whereas two symbols are required for decimal. The reason why hex is used is that two hexadecimal digits can efficiently represent any combination of eight binary digits (as opposed to decimal, which would require up to four digits). In allowing two decimal digits to represent 4 bits, using decimal could also cause confusion in reading a value. For example, the eight bit binary number 01110011 would be 115 if con- verted to decimal digits. Does this represent 11-5 or 1-15? If 11-5 is used, the binary number would be 10110101, which is not the number originally converted. Using hexadecimal, the conversion is 1F, which always converts back to 00011111. Table 1-6 Binary and Decimal Equivalents of Hexadecimal Digits Binary Hexadecimal Decimal 0000 0 0 0001 1 1 0010 2 2 0011 3 3 0100 4 4 0101 5 5 0110 6 6 0111 7 7 1000 8 8 1001 9 9 1010 A 10 1011 B 11 1100 C 12 1101 D 13 1110 E 14 1111 F 15 1102.book Page 29 Tuesday, May 20, 2003 2:53 PM 30 Chapter 1: Introduction to Networking The best way to think about hexadecimal is to think of it as a shorthand way of read- ing binary. It reduces an 8-bit number to just two hex digits. This reduces the confu- sion of reading long strings of binary numbers and the amount of space it takes to write them. Remember that hexadecimal is sometimes abbreviated as 0x, so hex 5D might be written as 0x5D. To convert from hex to binary, simply expand each hex digit into its 4-bit binary equivalent. Four-Octet Dotted-Decimal Representation of a 32-Bit Binary Number Currently, addresses assigned to computers on the Internet (IP addresses) are 32-bit binary numbers. To make it easier to work with these addresses, the 32-bit binary number is broken into a series of decimal numbers. To do this, split the binary number into four groups of eight binary digits. Then convert each group of 8 bits (an octet) into its decimal equivalent. Do this conversion exactly as was shown in the section, “Binary-to-Decimal Conversion.” When written, the complete decimal number is represented as four groups of decimal digits separated by periods, such as 10.15.129.201. This is called dotted-decimal nota- tion and provides a compact, easy-to-remember way of referring to 32-bit addresses. This representation is used frequently later in this course, so be sure to understand it. When converting to binary from dotted decimal, remember that each group of from one to three decimal digits represents a group of eight binary digits. If the decimal number you are converting is less than 128, you need to add 0s to the left of the equiv- alent binary number until you have a total of 8 bits. For example, to convert the dotted-decimal value 10.15.129.201 to its binary equiva- lent, you should write the number as 00001010.00001111.10000001.11001001. Boolean Logic Boolean logic is based on digital circuitry that accepts one or two incoming voltages and, based on these input voltages, generates an output voltage. For the purpose of computers, the voltage difference is associated with two states, on and off. These two states are in turn represented by a 1 or a 0, which are the two digits in the binary num- ber system. Hexadecimal Conversion In this exercise, you practice converting hexadecimal values to decimal and binary values. 1102.book Page 30 Tuesday, May 20, 2003 2:53 PM Bits, Bytes, and Measurement Terms 31 Boolean logic is a binary logic that allows two numbers to be compared, and then a choice based on those two numbers is generated. These choices are the logical AND, OR, and NOT. With the exception of the NOT, Boolean operations have the same func- tion. They accept two numbers (1 or 0) and generate a result based on the logic rule. This section presents the operations, starting with the NOT operation. The next sec- tion provides an example of directly applying Boolean logic in networking—network masking. This example covers the AND operation. The NOT operation, as shown in Table 1-7, simply takes whatever value is presented (0 or 1) and inverts it. A 1 becomes a 0, and a 0 becomes a 1. Remember that the logic gates are electronic devices built specifically for this purpose. This is the logic rule that they follow; whatever is input, the opposite is output. The AND operation, as shown in Table 1-8, takes two input values. If both values are 1, the logic gate generates a 1 output; otherwise, it outputs a 0. There are four combi- nations of input values. Three combinations generate a 0, and one combination gener- ates a 1. The AND operation is used extensively with IP addressing and subnet masks. The OR operation, as shown in Table 1-9, also takes two input values. If one value is 1 or both values are 1, the output is 1. Just like the AND operation, there are four com- binations of input values. However, in an OR operation, three of the combinations generate a 1 output, and one combination generates a 0 output. The two networking operations that use Boolean logic are subnetwork masking and wildcard masking. Masking operations provide a way to filter addresses. The addresses identify the devices on the network. Masking allows the addresses to be grouped or controlled by other network operations. Table 1-7 NOT Operation Input Output 01 10 Table 1-8 AND Operation AND 0 1 0 00 1 01 1102.book Page 31 Tuesday, May 20, 2003 2:53 PM 32 Chapter 1: Introduction to Networking IP Addresses and Subnet Masks The 32-bit binary addresses used on the Internet are called Internet Protocol (IP) addresses. This section covers the relationship between IP addresses and network masks. You learn more about IP addresses in Chapter 7. When IP addresses are assigned to computers, some of the bits on the left side of the 32 bit IP number are used to represent a network. The number of bits designated depends on the address class. The bits left over in the 32-bit IP address identify a particular computer on the network. A computer is called a host. So a computer’s IP address usually consists of a network portion and a host portion that represents a particular computer on a particular network. For the computer to know how the 32-bit IP address has been split, a second 32-bit number called a subnetwork mask is used. This mask is a guide that indicates how the IP address should be interpreted by identifying how many of the bits identify the com- puter’s network. The network mask sequentially fills in the 1s from the left side of the mask. A subnetwork mask is always all 1s until the network address is identified. Then it is all 0s from there to the mask’s rightmost bit. The bits in the IP address that are 0 identify the computer (host) on that network. Some examples of subnet masks follow. Example 1: 11111111.00000000.00000000.00000000 written in dotted decimal is 255.0.0.0. Example 2: 11111111.11111111.00000000.00000000 written in dotted decimal is 255.255.0.0. In the first example, the first 8 bits from the left are the network address, and the last 24 bits are the host address. In the second example, the first 16 bits are the network address, and the last 16 bits are the host address. Converting the IP address 10.34.23.134 to binary results in the following: 00001010.00100010.00010111.10000110 Table 1-9 OR Operation OR 0 1 0 01 1 11 1102.book Page 32 Tuesday, May 20, 2003 2:53 PM Summary 33 To determine the network portion of the IP address, compare the subnet mask bits to all 32 bits of the IP address 1 bit at a time, using the AND process, and record the result. The combination of a 0 IP address bit and a 0 mask bit is a 0. The combination of a 0 and a 1 is a 0. The combination of a 1 and a 1 is a 1. To better demonstrate, consider the following examples: Example 1: Using the first mask (255.0.0.0): 00001010.00100010.00010111.10000110: IP address 11111111.00000000.00000000.00000000: network mask 00001010.00000000.00000000.00000000 is the network part of the address. In dotted-decimal format, 10.0.0.0 is the network portion of the IP address. Example 2: Using the second mask (255.255.0.0): 00001010.00100010.00010111.10000110: IP address 11111111.11111111.00000000.00000000: network mask 00001010.00100010.00000000.00000000 is the network part of the address. In dotted-decimal format, 10.34.0.0 is the network portion of the IP address. The importance of subnetwork masking will become much clearer as you work more with IP addresses. For now, it is only important that you understand the concept of the network mask. Summary In this chapter, you learned the following key points: ■ Computers are vital components of every network. The more you know about computers, the easier it is to understand networks. ■ Knowing how a computer functions makes it easier to understand networks. ■ TCP/IP is the protocol of the Internet. ■ The ping command is a simple way of testing connectivity. ■ Software allows the user to interface with the hardware. In networking, web browsers and e-mail are the most commonly used software programs. ■ Troubleshooting PCs is a necessary skill when working on networks. ■ It is important to be familiar with the components of a computer and to under- stand the functions of a NIC. It is also important to be able to install a NIC. ■ Bits are binary digits. 8 bits equals 1 byte. 1102.book Page 33 Tuesday, May 20, 2003 2:53 PM 34 Chapter 1: Introduction to Networking ■ Computers can recognize and process data only by using the binary number sys- tem. The binary number system is made up of 0s and 1s. ■ The hexadecimal number system is used frequently at higher levels of computa- tion. The hexadecimal number system uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. ■ Boolean logic is a binary logic that allows two numbers to be compared. An operation is created based on the two numbers. Three common Boolean logic operators are NOT, AND, and OR. ■ IP addresses are the 32-bit binary addresses used on the Internet. To supplement all you’ve learned in this chapter, refer to the chapter-specific Videos, PhotoZooms, and e-Lab Activities on the CD-ROM accompanying this book. 1102.book Page 34 Tuesday, May 20, 2003 2:53 PM Key Terms 35 Key Terms American Standard Code for Information Interchange (ASCII) The most commonly used code for representing alphanumeric data in a computer. Uses binary digits (bits) to represent the symbols typed on the keyboard. application Interprets the data and displays the information in a comprehensible format as the last part of an Internet connection. Applications work with protocols to send and receive data across the Internet. backplane A large circuit board that contains sockets for expansion cards. binary A number system characterized by 1s and 0s (1 = on, and 0 = off). bit The smallest unit of data in a computer. A bit equals 1 or 0. It is the binary for- mat in which data is processed, stored, and transmitted by computers. In a computer, bits are represented by on/off switches or the presence or absence of electrical charges, light pulses, or radio waves. Boolean logic In computer operation with binary values, Boolean logic can describe electromagnetically charged memory locations or circuit states that are either charged (1 or true) or not charged (0 or false). The computer can use an AND gate or an OR gate operation to obtain a result that can be used for further processing. bus A collection of circuits through which data is transmitted from one part of a computer to another. byte A unit of measure that describes the size of a data file, the amount of space on a disk or another storage medium, or the amount of data being sent over a network. 1 byte equals 8 bits of data. CD-ROM drive An optical drive that can read information from a CD-ROM. central processing unit (CPU) The computer’s “brain,” where most of the calcula- tions take place. dotted-decimal notation A syntactic representation for a 32-bit integer that consists of four 8-bit numbers written in base 10 with periods (dots) separating them. Used to represent IP addresses on the Internet, as in 192.67.67.20. expansion slot An opening in a computer, usually on the motherboard, where an expansion card can be inserted to add new capabilities to the computer. File Transfer Protocol (FTP) An application protocol, part of the TCP/IP protocol suite, used to transfer files between network hosts. floppy disk drive Reads and writes to floppy disks. 1102.book Page 35 Tuesday, May 20, 2003 2:53 PM 36 Chapter 1: Introduction to Networking GB (gigabyte) Approximately 1 billion bytes. Sometimes called a “gig.” Hard drive capacity on most PCs is typically measured in GB. Gbps (gigabits per second) One billion bits per second. A standard measurement of the amount of data transferred over a network connection. 10G or 10 Gigabit Ethernet operates at 10 Gbps. hard disk drive Reads and writes data on a hard disk. The primary storage device in the computer. hyperlink A computer program command that points to other HTML files on a web server or other places on the same documents. Provides shortcuts to other web pages and files. Hypertext Markup Language (HTML) A simple hypertext document-formatting lan- guage that uses tags to indicate how a given part of a document should be interpreted by a viewing application, such as a web browser. Internet The largest global internetwork, connecting tens of thousands of networks worldwide and having a culture that focuses on research and standardization based on real-life use. Internet Protocol (IP) A network layer protocol in the TCP/IP protocol suite offering a connectionless internetwork service. Kb (kilobit) Approximately 1000 bits. KB (kilobyte) Approximately 1000 bytes (1024 bytes exactly). kbps (kilobits per second) One thousand bits per second. A standard measurement of the amount of data transferred over a network connection. kBps (kilobytes per second) One thousand bytes per second. A standard measurement of the amount of data transferred over a network connection. keyboard port Connects a keyboard to a PC. logical connection Uses standards called protocols. Mb (megabit) Approximately 1 million bits. MB (megabyte) Approximately 1 million bytes (1,048,576 bytes exactly). A megabyte is sometimes called a “meg.” The amount of RAM in most PCs is typically measured in MB. Large files are typically some number of MB in size. Mbps (megabits per second) One million bits per second. A standard measurement of the amount of data transferred over a network connection. Basic Ethernet operates at 10 Mbps. 1102.book Page 36 Tuesday, May 20, 2003 2:53 PM Key Terms 37 MBps (megabytes per second) One million bytes per second. A standard measure- ment of the amount of data transferred over a network connection. Media Access Control (MAC) address A standardized data link layer address that is required for every port of devices that connect to a LAN. Other devices in the network use these addresses to locate specific ports in the network and to create and update routing tables and data structures. MAC addresses are 6 bytes long and are controlled by the IEEE. memory chips RAM chips on memory cards plug into the motherboard. microprocessor A silicon chip that contains a CPU. modem A device that converts digital and analog signals. At the source, a modem converts digital signals to a form suitable for transmission over analog communication facilities. At the destination, the analog signals are returned to their digital form. motherboard A computer’s main circuit board. mouse port Connects a mouse to a PC. network interface card (NIC) A printed circuit board that provides network commu- nication capabilities to and from a PC. network interface card (NIC) A printed circuit board that provides network commu- nication capabilities to and from a PC. octet Eight bits. In networking, the term octet often is used (rather than byte) because some machine architectures employ bytes that are not 8 bits long. parallel port An interface that can transfer more than 1 bit simultaneously. It con- nects external devices, such as printers. Personal Computer Memory Card International Association (PCMCIA) An organi- zation that has developed a standard for small credit card-sized devices called PCM- CIA cards (or PC cards). Originally designed to add memory to portable computers, the PCMCIA standard has been expanded several times and is now suitable for many types of devices. physical connection A connection to a network that is made by connecting a special- ized expansion card, such as a modem or NIC, from a PC with a cable to a network. ping Stands for Packet Internet Groper. Often used in IP networks to test the reach- ability of a network device. plug-in Software or a program that can easily be installed and used as part of a web browser. 1102.book Page 37 Tuesday, May 20, 2003 2:53 PM 38 Chapter 1: Introduction to Networking power cord Connects an electrical device to an electrical outlet to provide power to the device. power supply Supplies power to a computer. printed circuit board (PCB) A thin plate on which chips (integrated circuits) and other electronic components are placed. protocol A formal description of a set of rules and conventions that govern how devices on a network exchange information. random-access memory (RAM) Also known as read-write memory. Can have new data written to it as well as stored data read from it. read-only memory (ROM) A type of computer memory in which data has been prerecorded. serial port Can be used for serial communication in which only 1 bit is transmitted at a time. sound card An expansion board that handles all sound functions. subnetwork In IP networks, a network that shares a particular subnet address. Sub- networks are networks arbitrarily segmented by a network administrator to provide a multilevel, hierarchical routing structure while shielding from the addressing complex- ity of attached networks. Sometimes called a subnet. subnetwork mask A 32-bit address mask used in IP to indicate the bits of an IP address that are being used for the subnet address. system unit The main component of a PC system. TB (terabyte) Approximately 1 trillion bytes. Hard drive capacity on some high-end computers is measured in TB. Tbps (terabits per second) One trillion bits per second. A standard measurement of the amount of data transferred over a network connection. Some high-speed core Internet routers and switches operate at more than Tbps. Transmission Control Protocol/Internet Protocol (TCP/IP) A common name for the suite of protocols developed by the U.S. DoD in the 1970s to support the construction of worldwide internetworks. TCP and IP are the two best-known protocols in the suite. universal serial bus (USB) port Lets peripheral devices such as mice, modems, keyboards, scanners, and printers be plugged in and unplugged without resetting the system. video card A board that plugs into a PC to give it display capabilities. 1102.book Page 38 Tuesday, May 20, 2003 2:53 PM . 4 010 1 5 5 011 0 6 6 011 1 7 7 10 00 8 8 10 01 9 9 10 10 A 10 10 11 B 11 11 00 C 12 11 01 D 13 11 10 E 14 11 11 F 15 11 02. book Page 29 Tuesday, May 20 , 20 03 2: 53 PM 30 Chapter 1: Introduction to Networking The. mask (25 5 .25 5.0.0): 000 010 10.0 010 0 010 .00 010 111 .10 00 011 0: IP address 11 111 111 .11 111 111 .00000000.00000000: network mask 000 010 10.0 010 0 010 .00000000.00000000 is the network part of the address. In. follow. Example 1: 11 111 111 .00000000.00000000.00000000 written in dotted decimal is 25 5.0.0.0. Example 2: 11 111 111 .11 111 111 .00000000.00000000 written in dotted decimal is 25 5 .25 5.0.0. In the