How Modems Work
If you are reading this article on your computer at home, it probably arrived via modem.
In this edition of HowStuffWorks, we'll show you how a modem brings you Web pages. We'll start with the original 300-baud modems and progress all the way through to the ADSL configurations!
(Note: If you are unfamiliar with bits, bytes and the ASCII character codes, reading How Bits and Bytes Work will help make this article much clearer.)
Let's get started with a short recap of how the modem came to be.
The Origin of Modems
The word "modem" is a contraction of the words modulator-demodulator. A modem is typically used to send digital data over a phone line.
The sending modem modulates the data into a signal that is compatible with the phone line, and the receiving modem demodulates the signal back into digital data. Wireless modems convert digital data into radio signals and back.
Modems came into existence in the 1960s as a way to allow terminals to connect to computers over the phone lines.
A typical arrangement is shown below:
In a configuration like this, a dumb terminal at an off-site office or store could "dial in" to a large, central computer. The 1960s were the age of time-shared computers, so a business would often buy computer time from a time-share facility and connect to it via a 300-bit-per-second (bps) modem.
A dumb terminal is simply a keyboard and a screen. A very common dumb terminal at the time was called the DEC VT-100, and it became a standard of the day (now memorialized in terminal emulators worldwide). The VT-100 could display 25 lines of 80 characters each. When the user typed a character on the terminal, the modem sent the ASCII code for the character to the computer. The computer then sent the character back to the computer so it would appear on the screen.
When personal computers started appearing in the late 1970s, bulletin board systems (BBS) became the rage. A person would set up a computer with a modem or two and some BBS software, and other people would dial in to connect to the bulletin board. The users would run terminal emulators on their computers to emulate a dumb terminal.
People got along at 300 bps for quite a while. The reason this speed was tolerable was because 300 bps represents about 30 characters per second, which is a lot more characters per second than a person can type or read. Once people started transferring large programs and images to and from bulletin board systems, however, 300 bps became intolerable.
Modem speeds went through a series of steps at approximately two-year intervals:
• 300 bps - 1960s through 1983 or so
• 1200 bps - Gained popularity in 1984 and 1985
• 2400 bps
• 9600 bps - First appeared in late 1990 and early 1991
• 19.2 kilobits per second (Kbps)
• 28.8 Kbps
• 33.6 Kbps
• 56 Kbps - Became the standard in 1998
• ADSL, with theoretical maximum of up to 8 megabits per second (Mbps) - Gained popularity in 1999
(Check out How DSL Works and How Cable Modems Work for more information on the progression of modem technology and current speeds.)
300-bps Modems
We'll use 300-bps modems as a starting point because they are extremely easy to understand. A 300-bps modem is a device that uses frequency shift keying (FSK) to transmit digital information over a telephone line. In frequency shift keying, a different tone (frequency) is used for the different bits (see How Guitars Work for a discussion of tones and frequencies).
When a terminal's modem dials a computer's modem, the terminal's modem is called the originate modem. It transmits a 1,070-hertz tone for a 0 and a 1,270-hertz tone for a 1. The computer's modem is called the answer modem, and it transmits a 2,025-hertz tone for a 0 and a 2,225-hertz tone for a 1. Because the originate and answer modems transmit different tones, they can use the line simultaneously. This is known as full-duplex operation. Modems that can transmit in only one direction at a time are known as half-duplex modems, and they are rare.
Let's say that two 300-bps modems are connected, and the user at the terminal types the letter "a." The ASCII code for this letter is 97 decimal or 01100001 binary (see How Bits and Bytes Work for details on binary). A device inside the terminal called a UART (universal asynchronous receiver/transmitter) converts the byte into its bits and sends them out one at a time through the terminal's RS-232 port (also known as a serial port). The terminal's modem is connected to the RS-232 port, so it receives the bits one at a time and its job is to send them over the phone line.
Faster Modems
In order to create faster modems, modem designers had to use techniques far more sophisticated than frequency-shift keying. First they moved to phase-shift keying (PSK), and then quadrature amplitude modulation (QAM). These techniques allow an incredible amount of information to be crammed into the 3,000 hertz of bandwidth available on a normal voice-grade phone line. 56K modems, which actually connect at something like 48 Kbps on anything but absolutely perfect lines, are about the limit of these techniques (see the links at the end of this article for more information).
Here's a look inside a typical 56K modem:
All of these high-speed modems incorporate a concept of gradual degradation, meaning they can test the phone line and fall back to slower speeds if the line cannot handle the modem's fastest speed.
The next step in the evolution of the modem was asymmetric digital subscriber line (ADSL) modems. The word asymmetric is used because these modems send data faster in one direction than they do in another. An ADSL modem takes advantage of the fact that any normal home, apartment or office has a dedicated copper wire running between it and phone company's nearest mux or central office. This dedicated copper wire can carry far more data than the 3,000-hertz signal needed for your phone's voice channel. If both the phone company's central office and your house are equipped with an ADSL modem on your line, then the section of copper wire between your house and the phone company can act as a purely digital high-speed transmission channel. The capacity is something like 1 million bits per second (Mbps) between the home and the phone company (upstream) and 8 Mbps between the phone company and the home (downstream) under ideal conditions. The same line can transmit both a phone conversation and the digital data.
The approach an ADSL modem takes is very simple in principle. The phone line's bandwidth between 24,000 hertz and 1,100,000 hertz is divided into 4,000-hertz bands, and a virtual modem is assigned to each band. Each of these 249 virtual modems tests its band and does the best it can with the slice of bandwidth it is allocated. The aggregate of the 249 virtual modems is the total speed of the pipe.
(For information on the latest DSL technology, see How DSL Works.)
Point-to-Point Protocol
Today, no one uses dumb terminals or terminal emulators to connect to an individual computer. Instead, we use our modems to connect to an Internet service provider (ISP), and the ISP connects us into the Internet. The Internet lets us connect to any machine in the world (see How Web Servers and the Internet Work for details). Because of the relationship between your computer, the ISP and the Internet, it is no longer appropriate to send individual characters. Instead, your modem is routing TCP/IP packets between you and your ISP.
The standard technique for routing these packets through your modem is called the Point-to-Point Protocol (PPP). The basic idea is simple --your computer's TCP/IP stack forms its TCP/IP datagrams normally, but then the datagrams are handed to the modem for transmission. The ISP receives each datagram and routes it appropriately onto the Internet. The same process occurs toget data from the ISP to your computer. See this page for additional information on PPP.
Thursday, May 29, 2008
Subscribe to:
Posts (Atom)