Title: Physical Layer: Data Encoding
1Physical LayerData Encoding Transmission
2Network Interface Card (NIC)
- LL in part, PL in total are implemented in NIC
- Ethernet card, 802.11 card,
- NIC is semi-autonomous
- Listens to the link independent of the CPU
- Talks to CPU after reception of a new frame
- CPU talks to the card to send a frame
- Has connectivity to both the I/O bus and the
network link
3Steps in Transmission of a Datagram to a Neighbor
Datagram
Datagram
H
Datagram
Y
All bits in D OK?
LL
N
Datagram
H
Detected error
LL
D
EDC
Datagram
H
EDC
Decode Bits from the Link
Encode Bits to the Link
PL
PL
4Encoding - Definitions
- Data Something which carries meaning
- Can be analog, e.g., radio, TV signals or digital
such as data files etc. - For this course, we are ONLY interested in
digital data encoding - Signal Encoded data, i.e., what is transferred
on the link (wired or wireless) - Analog Represents data with continuously varying
electromagnetic waves - Digital Represents data with a sequence of
voltage pulses
5Encoding Digital Data
- Digital Data (0s and 1s) can be encoded as an
Analog Signal - Signal on the link is an electromagnetic wave of
some frequency - Signal can also be photonic pulses of a given
wavelength over optical fiber - 3 general methods
- Amplitude Shift Keying
- Frequency Shift Keying
- Phase Shift Keying
6Digital Data to Analog SignalASK
Modem
Analog Signal s(t)
Digital Data m(t)
s(t) A cos(2PIfct) binary 1 s(t) 0
binary 0
7Digital Data to Analog SignalFSK
Modem
Analog Signal s(t)
Digital Data m(t)
s(t) A cos(2PIf1t) binary 1 s(t) A
cos(2PIf2t) binary 0
8FDM FSK on Voice Grade Line
- Full-duplex FSK transmission on a Voice-Grade
Line - The frequency band 300Hz-3400Hz is divided into
to halves - 300Hz-1850Hz 1850-3400Hz Frequency Division
Multiplexing - Then
- Frequencies 2025 2225 are used to encode 1 and
0 in one direction - Frequencies 1070 1270 are used to encode 1 and
0 in the other direction
9Digital Data to Analog Signal PSK
Analog Signal
Modem
Digital Data
s(t) A cos(2PIfct PI) binary 1 s(t) A
cos(2PIfct) binary 0
QPSK uses s(t) A cos(2PIfct PI/4)
binary 11 s(t) A cos(2PIfct 3PI/4)
binary 10 s(t) A cos(2PIfct 5PI/4)
binary 00 s(t) A cos(2PIfct 7PI/4)
binary 01
- Each signaling element carries 2 data elements
- Signaling element rate Baud-rate
- Data element rate Bit-rate
10Encoding Digital Data
- Digital Data (0s and 1s) can also be encoded as a
Digital Signal - Signal on the link are discrete, discontinuous
voltage pulses - Each pulse is a signal element
- Binary data encoded into signal elements
- E.g., 2 voltage levels, one of them representing
digital 0, the other one representing digital 1 - Lots of different encoding methods
- Non-Return to Zero (NRZ)
- Manchester Encoding
- 4B/5B
- NRZ-I
- NRZ-M
- Bi-Phase-Mark, Bi-Phase-Space
- Differential Bi-Phase-Space, Differential
Bi-Phase-Mark
11Digital Data to Digital Signal NRZ
Digital Data
Digital Signal
Encoder
- Non-Return to Zero (NRZ)
- 1high signal (5V), 0lower signal (-5V)
- One-to-one correspondence between data signal
12Manchester Encoding
- Manchester Encoding Used in Ethernet
- 0 is encoded as low to high transition
- 1 is encoded as high to low transition
- Not very efficient
- Signaling rate (baud-rate) is twice the data rate
(bit-rate)
1
0
0
0
1
1
0
1
0
1
0
Digital Data
Clock
Digital Signal
134B/5B
- Attempts to address the inefficiency of the
Manchester encoding without suffering from the
problem of having extended durations of high or
low signals as was the case in NRZ - Idea is to insert extra bits into the bit stream
so as to break up long sequences of 0s and 1s - Specifically, every 4-bit of actual data is
encoded into a 5-bit code that is then
transmitted to the receiver using NRZI
4-bit Data Symbol
5-bit Code
4-bit Data Symbol
5-bit Code
0000 11110 0001 01001 0010
10100 0011 10101 0100 01010 0101
01011 0110 01110 0111 01111
1000 10010 1001 10011 1010
10110 1011 10111 1100 11010 1101
11011 1110 11100 1111 11101
14Encoding Digital Data
- Why use an analog signal to carry digital data?
- Because some mediums only propagate analog
signals - Optical fiber, air (unguided media)
- Because the network was designed to receive,
switch and transmit analog signals - PSTN handles analog signals in the voice range of
about 300-3400Hz. - Why do digital data-to-digital signal encoding?
- Equipment for encoding digital data into digital
signal is less complex and less expensive
15Transmission of Encoded Data
Receiver
Sender
Digital Signal NRZ
- After encoding the digital data, the sender
simply puts the signal on the wire as shown above - How does the receiver decode this signal?
- Receiver must sample on the middle of each
signaling element as shown above - Problem
- How do you synchronize the sender receiver
clocks?
16Sender/Receiver Clocking
- Timing problems require a mechanism to
synchronize the sender and the receiver - Two mechanisms
- Provide a separate line to send the clock signal
from the sender to the receiver. The receiver
then uses the same clock to decode the incoming
signal - OK for short distances, but not practical for
long distances - Way too
- Let the sender and receiver use independent
clocks - Independent clocks can easily get out of sync.
Then, - Have the receiver synch its clock from the
incoming signal - Called Self-Clocking
17Self-Clocking Transmission
- Two ways to sync the sender and the receiver
during self-clocking transmission - Asynchronous Transmission
- Data transmitted one character at a time with
start/stop bits - Each char is 5 to 8 bits
- Timing only needs to be maintained within each
character - Re-sync after each character
- Synchronous Transmission
- Data transmitted as a stream of bits with no
start or stop bits - The receiver must synch itself using the incoming
signal - Signal must have enough transitions to let the
receiver sync itself from the signal
18Asynchronous (diagram)
19Asynchronous - Behavior
- In a steady stream, interval between characters
is uniform (length of stop element) - In idle state, receiver looks for transition 1 to
0 - Start bit
- Then samples next 7 or 8 intervals (char length)
- Then looks for next 1 to 0 for next char
- Simple
- Cheap
- Overhead of 2 or 3 bits per char (20)
- Good for data with large gaps (keyboard)
- Used in RS-232 Serial Port Communication
20Synchronous Transmission
- Block of data transmitted without start or stop
bits - How to synchronize clocks?
- Need to have enough transitions on the signal
- Manchester encoding a transition for every bit
makes clock recovery very easy - 4B/5B Make sure there will be enough transitions
within the signal regardless of the bit-stream,
while keeping the overhead at 20 -- Used by some
Ethernets - NRZ Long stream of 0s or 1s make clock
recovery almos impossible. So NRZ is almost never
used in synchronous transmission
21Summary
- Covered Digital Data Encoding Methods
- Digital Data-to-Analog Signal Encoding
(Modulation) - ASK
- FSK
- PSK
- Digital Data-to-Digital Signal Encoding
- NRZ
- Manchester
- 4B/5B
-
- Covered transmission of encoded data over the
link - Asynchronous Transmission Data transmitted one
character at a time with start/stop bits - Synchronous transmission Data transmitted as a
stream of bits with no start or stop bits