VCE IT Lecture Notes by Mark Kelly, McKinnon Secondary

Modems

Modem: (MODulator-DEModulator). The modem is simple in principle but complex in design. It is used to transmit data over physically remote locations over traditional telephone lines. Unfortunately, phone lines cannot carry digital data: they are meant to carry sounds (analogue data). When sending data, the computer sends digital data to the modem. The modem converts the digital 1's and 0's to sounds (e.g. High pitched sound for a one. Low pitched sound for a zero). This explains the "shushhhhhhhhhing" noise your modem makes when you connect to the internet: that noise is thousands of ones and zeroes being pumped down the phone line each second. Converting digital data to sound is called modulation. The sound travels as noise over the phone line until it reaches the modem at the other end of the line. Because the other modem is in receiving mode, it listens to the sounds and converts the high and low pitched sounds back to ones and zeros (demodulation) and passing them to the computer. When the second computer wants to transmit, it switches from demodulation (listening) to modulation (talking), and sends data-sounds to the first modem which is now listening.

Modems are rated by speed: a 56K modem can transmit (a theoretical maximum of) about 56,000 ones and zeros per second.
Important note 1: the "K" in "56K" refers to BITS, not BYTES. While a 56K file on disk means "56 kilobytes" (56,000 bytes), "56K" in modems means "56 kiloBITS" which is roughly 5.6 kiloBYTES. Many people do not realise this.  Amaze your friends at your next party with this pearl of wisdom.
Important note 2: 56K modems receive at 56K but can only transmit at 33.6K.

The problem with phone lines is that they were never designed to transmit 56,000 sounds per second with perfect accuracy. They were designed for grandma to chat to mum about scones. An occasional click or bit of static on the line does not bother granny but it can destroy entire computer conversations. If only one bit out of 70,000,000 is wrong, your entire downloaded file can be ruined.

To solve this problem, modem communications have built in error checking. The transmitting modem sends chunks of data in packets, small chunks. Before sending, the computer does a checksum calculation on the data in the packet. (Very simple example: before transmiting the numbers 1,2,3,4,5 it multiplies the numbers together to get 1 x 2 x 3 x 4 x 5 = 120). The sending computer sends the data (1,2,3,4,5 along with the checksum 120). The receiving computer receives the data and computes a checksum the same way the sending computer did (such agreement on how to do things is called a protocol). When the receiving computer finishes its checksum, it compares it with the checksum sent by the other computer. If they agree, the data is good and the receiver sends an "ACKnowledge" message. If they are different, the data has been corrupted and the receiver sends a "NAK" message ("No acknowledgement"). If the sending computer gets an "ACK" it knows that last packet was good, so it sends the next one. If it gets a "NAK" it sends the same packet again - and again - until it gets an ACK. If the phone line conditions are bad (e.g. lightning in Colorado), they may have to retry the same packet dozens of times. After a fixed number of attempts, the computers may give up and tell you the connection has been broken.

Internal modems (that plug into an expansion slot inside the computer) have less intelligence and rely on the CPU to do a lot of their work - as do USB modems. External modems (that plug into a serial port) do all their work themselves and put less strain on the CPU.

How modems work

How cable modems work

 

Back to the IT Lecture Notes index

Created November 25, 2002

Last changed: May 26, 2005 1:35 PM

VCE IT Lecture notes copyright © Mark Kelly 2001-