Simple Physical Layer Communications

The purpose of the physical layer is to send a stream of bits from one node to another. It doesn’t matter what the bits represent. Email, Web pages, digitized telephone bits are all the same. We will only consider the transmission of binary digital data at this time. In the lingo of communication's standards, bytes are often referred to as octets to denote that they are composed of eight bits. These notes will use the common term byte to refer to an eight bit unit or character.

Data is usually sent over a single channel one bit at a time. A single wire transmits the bits one after another. Some systems for local communications send multiple bits at a time. Data transmitted between a PC and a printer is sent 8 bits at a time over a printer cable. Most networks, particularly long distance connections, send data one bit at a time. Over long distances there can be a time skew problem where all of the parallel bits do not arrive at the final destination at the same time. Cost is also a major consideration. A long cable with enough conductors to send 8 parallel bits costs more than a cable to send one bit at a time.

Data can be sent synchronously or asynchronously. With asynchronous communications, the sending of a byte does not determine the time the next byte will be sent. With synchronous transmissions there is a time dependency between the bits or bytes being sent. Bits can be synchronized so that each bit is sent at a specified time after the previous bit. Bytes can be sent synchronously so that one byte follows another.

Consider a very simple method of sending binary data over a wire. Bits can be sent by varying the voltage on the line. Positive voltage can represent a 1 bit and negative voltage a 0 bit. In the below diagram, a 0 or 1 bit can be sent at any time. This is bit-wise asynchronous. (Note that very few existing systems actually use this method.) This diagram, like many similar diagrams we will use, shows time moving to the right. The first bit sent is on the left and the last bit sent is on the right. You might see a similar image with an oscilloscope connected to the transmission line.

©Prentice Hall

In the above system it is easy for the receiving side to determine when the next bit arrives and when the signal for that bit is complete. It is interesting to note that this system does not have a fixed transmission speed. The bits are sent as quickly or as slowly as the sending side chooses.

While bit-wise asynchronous communication is rare, some system transmit the bits within a byte in a synchronous manner while the bytes are asynchronous. Once a byte starts transmitting, each bit is sent one after another according to a clock. There is no synchronization between bytes. Another byte can arrive at any time. This byte-wise asynchronous, bit-wise synchronous communications is generally know as asynchronous or asynch communications. Keyboards typically generate asynchronous data. EIA RS-232-C is a standard for asynch communications. It is also known as ITU V.24. An Asynch RS-232-C line is bit-wise synchronous and character-wise asynchronous. RS-232 represents a 1 as -15 volts (MARK) and 0 as +15 volts (SPACE). The signal is always +15 or -15 without returning to 0 between bits. When there is nothing to send, the line is kept at the -15 volt state. This helps to differentiate between an idle line and when the connection has been broken which would drop the voltage to zero.

©Prentice Hall

The sender and receiver must synchronize on when a bit is being sent. This is necessary to recognize consecutive 1 (or 0) bits. To know when a new character starts, a 0 start bit is sent. Without the start bit, the receiver cannot distinguish between the idle state and a series of leading 1 bits. At the end of a character, the line must return to the 1 state. It can stay in the idle 1 start for an arbitrary length of time. The minimum time is the stop bit period. It is usually one bit period, but can be 2 or even 1.5 bits. If the received character does not fit this pattern (start bit, data, stop bit) then it reports a framing error. On old terminals there used to be a BREAK key that forced the transmitter into the 0 state. The transmitter stayed in the 0 state for much longer than the time to transmit a character. This caused a framing error. This was frequently used to signal the transmitter to stop sending characters.

Sender and receiver must be operating at the same speed. Speeds are determined by the hardware and can frequently be adjusted by software. The sender and receiver must synchronize on the rate at which bits are sent.

Simultaneous communication in both directions is called full duplex. Systems that alternate between sending and receiving are called half duplex. Systems that only send data in one direction are called simplex.

The RS-232-C standard supports full duplex communication using a 25 pin plug.

You can get by with only 3 wires (send, receive and ground) if you ignore the control information. While some modems use the 25 pin RS-232 plug, frequently only 9 of the pins are used.  A smaller 9 pin plug of similar configuration is usually found on most computers. The 9 pin plug uses the following signals.

Transmit (pin 2)
Receive (pin 3)
Protective Ground (pin 1)
Request to Send (pin 4)
Clear to Send (pin 5)
Data Set Ready (pin 6)
Carrier Detect (pin 8)
Data Terminal Ready (pin 20)
Common Return (pin 7)

The transmit line of the terminal is connected to the receive line of the modem. In the RS232 standard, terminals are called Data Terminal Equipment and modems are Data Circuit-Terminating Equipment).

©Prentice Hall

It is possible to design a system that sends more than just two values. Consider a system similar to RS232 (ignoring start and stop bits for the moment) that can set the transmission line to 4 different voltages, +10, +5, -5 and -10. Every time period one of these four values will be sent. Each value can represent two bits, such as +10 volts = 00, +5 volts = 01, -5 volts = 10 and -10 volts = 11. For every value sent, two bits of information are received. The rate at which values are sent is called the Baud rate. In this example the number of bits transmitted per second is twice the baud rate. One should be careful not to confuse baud with bits/second.

The greater the number of different possible values you can send, the more data that can be sent per signal.  If there are V possible different values or states that can be sent, then log2V bits can be sent per signal.  More data can be sent in a given time period if a larger number of states can be transmitted. In the diagram above, two bits are sent every signal. If the system sends 1000 signals per second (that is, each signal lasts one millisecond), it would be transmitting at 1000 baud. Because each signal encodes two bits, it would be transmitting at 2000 bits per second (bps).

In 1924 H. Nyquist derived an equation relating bandwidth and maximum data rate

max data rate(bits/sec) = 2 * B * log2 V

where B = bandwidth and V = number of different values that can be sent.

Bandwidth is the range of frequencies that can be sent and received. All hardware has a limited range of frequencies over which it can operate. The human ear functions between 50Hz to 20KHz, so it has a bandwidth of about 19,950Hz. Filters in the telephone system allow only frequencies between 50Hz and 3050Hz for a bandwidth of 3KHz. This limited bandwidth explains why music does not sound very good over the telephone.

The Nyquist formula applies to perfect noiseless channels and gives the absolute maximum speed available. If you send binary values (V = 2) over a 3000Hz line (Hz = Hertz = cycles / second), the maximum data rate is 6K bps. If you can send one of four different values (V=4, as in the figure above), you can get a maximum data rate of 12K bps. The data rate would be 12K bps while the baud rate would be 6K.

Most calculators do not have the base 2 logarithm function which is required to compute this equation. You can calculate the value by remembering the algebraic identity . To calculate the log2 of B, calculate the log10 of B and divide it by the log10 of 2.

When a bit is transmitted over a wire in the real world, it is subject to noise and distortion. (figure below ©Prentice Hall)

Real communication lines have noise, both thermal noise and environmental noise. Noise is represented as a signal/noise ratio (S/N) or the ratio of the strength (energy) of the signal to the strength (energy) of the noise.

In 1948 Shannon derived an equation for channels with random thermal noise:

maximum data rate(bits/sec) = B * log2 (S/N + 1)

Note that the "+1" is unimportant if we are talking about S/N in the thousands. Noise is usually represented in decibels (dB). dB = 10 * log10 S/N or Substituting the expression for noise expressed in decibels into the Shannon equation and simplifying to eliminate base 2 logs, we get:

A good telephone connection has a S/N of 34 - 38 dB. A 34 dB phone line has a max data rate of 33,885 bps. This is why the maximum upload speed of a home telephone modem is 31.2 Kbps. 56K modems do not really work at 56,000 bits per second and subject to the Shannon formula limitations like all communication systems in the world.


Some figures on this web page come from the CD accompanying Computer Networks and Internets, 2nd edition, by Douglas E. Comer and are copyrighted by Prentice-Hall.  Other figures were created by Ken Williams.