0% found this document useful (0 votes)
5 views58 pages

Understanding Data Communication Techniques

Uploaded by

2004akhand
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views58 pages

Understanding Data Communication Techniques

Uploaded by

2004akhand
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Data Communication

Shubham Anand
Assistant Professor
ECE Department
BIT Mesra, Ranchi
Transmission

Parallel Serial

Asynchronous Synchronous

• Serial transmission means signaling elements are transferred over a single signal path rather than
a parallel set of lines.

Signaling Element

Less than one bit One bit More than one bit

e.g., Manchester Coding NRZ-L and FSK QPSK


Timing in Digital Transmission

• Receiver must sample the incoming signal once per bit to detect binary values.

Timing Difficulty

• Transmission impairments may corrupt the signal.


• The receiver must know bit duration to sample correctly.
• Synchronization between Tx and Rx is critical.

Example: 1 Mbps Transmission

• Bit rate = 1 million bits/second (1 Mbps).


1
• Bit duration = 6 seconds= 1 μs per bit.
10
• Receiver samples in the middle of each bit time.
Synchronization Problem

• If transmitter and receiver clocks are not aligned → sampling errors occur.

• Example with 1% clock drift:


• Drift per bit = 0.01 μs
• After 50 bits → error = 50×0.01=0.5μs (receiver now sampling at bit boundary).
• Receiver may misinterpret bits.
Asynchronous Transmission

What is Asynchronous Transmission?

• A method of data transfer where timing is maintained only within each character.

• No need for long continuous synchronization → Each character is sent independently.

• Data is transmitted one character at a time (5–8 bits typically).


Part (c) of the last figure shows:

1. Data Rate & Bit Duration

•Data rate: 10,000 bits per second (10 kbps).


•Each bit duration = 1 / 10,000 = 0.0001 s = 0.1 ms (100 μs).
2. Timing Error Assumption
•Receiver’s clock is fast by 6% per bit time.
•That means the receiver "thinks" the bit period is: 0.1 𝑚𝑠 × 1 − 0.06 = 0.094 𝑚𝑠per bit.

3. Effect of Timing Error


•Receiver samples the incoming data every 0.094 ms instead of every 0.1 ms.
•This small error accumulates over multiple bits.
•After several bits, the sampling point drifts away from the center of the bit.

4. Accumulated Drift
•In 1 bit, drift = 0.1 − 0.094 = 0.006 𝑚𝑠 = 6𝜇𝑠.
•Over n bits, total drift = 𝑛 × 0.006 𝑚𝑠.
•Eventually, the drift becomes large enough that the receiver samples in the wrong bit window.
4. Example Outcome
•By the last bit of a character (e.g., in an 8-bit character frame), the cumulative drift is enough that the
receiver samples the next bit instead of the correct one.
•This results in bit errors in reception.

5. Key Insight
•Even a small timing mismatch between transmitter and receiver clocks (here only 6%) can cause
synchronization loss and data errors.
Key Features

1. Idle State:
1. When no data is sent, the line remains in an idle condition.
2. For NRZ-L signaling → Idle = binary 1 (negative voltage on line).
2. Start Bit:
1. Each character begins with a start bit (binary 0) → signals the arrival of new
character.
3. Data Bits:
1. Follow the start bit → 5 to 8 bits (LSB sent first).
2. Example: IRA characters usually 7 data bits.
4. Parity Bit :
1. Used for error detection (even or odd parity).
2. Ensures total 1’s count in data + parity bit is even/odd.
5. Stop Bit:
1. One or more stop elements (binary 1).
2. Duration: 1, 1.5, or 2 times bit length.
3. Keeps line in idle state until next character.
Advantages

• Simple and cheap (widely used in keyboards, RS-232 serial communication).


• Each character resynchronizes receiver, avoiding long-term drift.
• Small timing errors (±5%) can be tolerated.

Disadvantages

Overhead:
• Start + Stop bits add 2–3 extra bits per character.
• Example: For 8-bit data + 1 stop bit → 2 out of 10 bits = overhead of 20%.
Framing Errors:
• Occur when timing drift causes incorrect recognition of start/stop bits.
• Example: Noise during idle state may look like a start bit.
Not efficient for high-speed, long data streams (better use synchronous transmission).
Example

• Data rate = 10 kbps → Each bit = 100 μs.


• Receiver is 6% faster (samples every 94 μs).
• By the 8th bit, error occurs because receiver sampling is misaligned.
Synchronous Transmission

What is Synchronous Transmission?

• Data is sent as a continuous block (frame) instead of character by character.


• No start/stop bits for each character.
• Requires synchronization between transmitter and receiver clocks → prevents timing drift.

How Synchronization is Achieved

Separate Clock Line:


• One line sends data, another line sends clock pulses.
• Receiver uses clock pulses to stay synchronized.
• Works well for short distances.
Embedding Clock into Data Signal:
• Uses encoding methods (e.g., Manchester, Differential Manchester) to include timing
info inside the data.
• For analog signals, synchronization can be achieved by using the carrier frequency.
Frame Structure

• Since there are no start/stop bits, the receiver needs a way to know where a frame starts
and ends.
• A frame = data block + synchronization bits + control info.

Frame fields:

1. Preamble → Special bit pattern at the start (helps receiver detect frame beginning).
2. Control Fields → Protocol-specific info (e.g., addressing, error control).
3. Data Field → Actual payload (variable length).
4. Postamble (Flag) → Special bit pattern at the end (marks frame boundary).
Advantages of Synchronous Transmission

1. Efficient:

a) No start/stop bits per character.


b) Overhead is very low (< 100 bits per frame).
c) Much better efficiency than asynchronous (which can waste 20%+ in overhead).

2. Better for Large Blocks of Data:

a) Used in high-speed communication (networks, modems, satellite, WAN protocols).


b) Supports bulk data transfer efficiently.
Types of Errors in Data Transmission

Error in Transmission

• An error occurs when the received bit is different from the transmitted bit.
• Example: Transmitter sends 1, but receiver gets 0.

Two Main Types of Errors

Single-Bit Error
• Only one bit is altered.
• Does not affect nearby bits.
• Often caused by random noise (e.g., white noise).
Burst Error
A group of bits in which errors occur close together.

Definition:
• Burst error length = B bits.
• First and last bits are erroneous, with some or all bits in between also possibly
erroneous.
• IEEE Std 100 & ITU-T Q.9: Two erroneous bits are considered part of a burst if
separated by less than x correct bits.

Example

Suppose a noise/fading event lasts 1 μs.


•At 10 Mbps → 10 bits are affected → burst error of 10 bits.
•At 100 Mbps → 100 bits are affected → burst error of 100 bits.

Conclusion: Higher data rates = longer burst errors for the same noise duration.
Why Error Detection?
• In digital transmission, errors occur due to noise, fading, or other impairments.
• Errors = one or more bits in a frame are changed during transmission.
• To ensure reliability, error detection techniques are used.

1. Error Probabilities
Let’s define probabilities to measure errors in frames:

• 𝑃𝑏 → Probability that a bit is received in error. Known as Bit Error Rate (BER).

• 𝑃1 → Probability that a frame arrives with no bit errors.

• 𝑃𝟐 → Probability that a frame arrives with one or more undetected errors (error occurs, but
not caught).

• 𝑃𝟑 → Probability that a frame arrives with one or more detected errors (error occurs and is
caught).
Without Error Detection scenario

If we assume:

• 𝑃𝑏 = constant (probability of any bit being in error).


• 𝐹 = number of bits per frame.

Then:

• 𝑃1 = (1 − 𝑃𝑏 )𝐹
• 𝑃2 = 1 − 𝑃1

• As frame length ( 𝐹 ) increases, the probability of error-free transmission decreases.

• Longer frames = more chances at least one bit will be corrupted.


Principle of Error Detection

• Idea: Add redundant bits (error-detecting code) to data before transmission.


• These extra bits allow the receiver to check correctness of received frame.

Process:

1. Transmitter Side
1. Take k data bits.
2. Apply error-detecting function → generate (n−k) check bits.
3. Append to data → Frame length = n bits.

2. Receiver Side
1. Separates received frame into data + check bits.
2. Recomputes error-detecting code from data bits.
3. Compares with received check bits.
4. If mismatch → error detected.
Error Detection Probabilities

• 𝑃2 = Probability that error occurs but goes undetected.


• Called residual error rate.

• 𝑃𝟑 = Probability that error occurs and is detected successfully.


Error Detection Process

•Transmitter:
• Data bits 𝐸 .
• Apply function f(data) → get
error-detecting code 𝐸.
• Frame = Data +𝐸.

•Receiver:
• Separates received frame into
Data′ + 𝐸 ′ .
• Applies same function
f(Data′ ).
• If 𝐸 ≠ 𝐸 ′ → Error detected.
Fig. : Error detection process
Key Points

• Errors are inevitable → we must detect them.

• Probability of error-free frame decreases with frame length.

• Error detection adds redundant bits to detect (not always correct)


errors.

• Residual error rate (undetected errors) must be very small for


reliable communication.
Parity Check
What is Parity Check?

• A simple error detection technique.


• Works by adding one extra bit (called parity bit) to a block of data (e.g., a character).
• Purpose: Make the total number of 1s in the code even or odd.

Types of Parity

1. Even Parity
• Parity bit is chosen so that the total number of 1s = even.

2. Odd Parity
• Parity bit is chosen so that the total number of 1s = odd.
How Parity Check Works

1. Sender counts number of 1s in data.

2. Adds parity bit (0 or 1) to satisfy chosen parity rule.

3. Receiver checks parity of received bits:


• If parity condition holds → assume no error.
• If parity condition fails → error detected.
Example

•Suppose transmitter sends IRA character G = 1110001.

•Using Odd Parity:


• Data has 4 ones (even).
• To make it odd → add 1.
• Transmitted: 11100011.

•Receiver:
• Counts 1s = 5 (odd). :- Correct.

•If during transmission, 1-bit flips:


• Example: 11100001 (last bit flipped).
• Number of 1s = 4 (even). :- Error detected.
Limitation

If two or any even number of bits are flipped, the parity check fails to detect the error.
• Example: Data 11100011 → suppose 2 bits flip → 10100001.
• Count of 1s = 3 (odd) → still satisfies odd parity → Error goes undetected.

Usage

• Even Parity → commonly used in synchronous transmission.


• Odd Parity → commonly used in asynchronous transmission.

Advantages

• Very simple and low-cost.


• Detects all single-bit errors.
• Easy to implement in hardware.
Disadvantages

• Cannot detect multiple-bit errors of bit errors.


• Not suitable for burst errors (common in real-world channels).
• Reliability decreases at high data rates (more burst errors).

Key Points

• Parity check = simplest error detection method.


• Good for single-bit errors.
• Weak against burst or multiple-bit errors → modern systems combine parity with stronger
error detection methods (like CRC).
Cyclic Redundancy Check (CRC)
What is CRC?

• CRC is one of the most powerful error-detecting codes.

• Idea:

• Given a data block of 𝑘 bits, the transmitter generates an (𝑛 − 𝑘) bit sequence called
Frame Check Sequence (FCS).

• FCS is chosen so that the combined 𝑛 -bit frame (data + FCS) is exactly divisible by
a predetermined number (divisor polynomial 𝑃).

• At the receiver:
• Divide the received frame by the same divisor 𝑃.
• If remainder = 0 → assume no error.
• If remainder ≠ 0 → error detected.
1. Modulo-2 Arithmetic

• CRC uses binary arithmetic modulo-2.

• Properties:
• Addition and subtraction are both XOR (no carries, no borrows).

• Examples:
1111 ⊕ 0101 = 1010
1111 − 0101 = 1010

Thus, CRC division = repeated XOR operations.


2. Definition of Terms

• 𝑇 = transmitted frame (𝑛 bits)

• 𝐷 = data block (𝑘 bits)

• 𝐹 = FCS (𝑛 − 𝑘 bits)

• 𝑃 = divisor polynomial (pattern of length 𝑛 − 𝑘 + 1 bits)

𝑇
We want: ​has no remainder.
𝑃

So, 𝑇 = 2𝑛−𝑘 . 𝐷 + 𝐹
3. How FCS is Computed

a) Multiply data 𝐷 by 2𝑛−𝑘 (append 𝑛 − 𝑘 zeros).


• This shifts data left, creating space for FCS.
b) Divide this shifted data by 𝑃.
c) Take the remainder 𝑐 → this becomes the FCS.
d) Add FCS to shifted data → final transmitted frame 𝑇.

• So, Mathematically:
2𝑛−1 𝐷 𝑅
=𝑄+
𝑃 𝑃

Where: 𝑄 = quotient (not used in CRC, just a by-product)


𝑅 = remainder (FCS)

• Thus, 𝑇 = 2𝑛−𝑘 . 𝐷 + 𝑅
Proof of correctness:

To check if transmitted frame 𝑇 is divisible by 𝑃 :


𝑇 2𝑛−𝑘 +𝑅
= .
𝑃 𝑃
From division rule:
2𝑛−𝑘 𝑅
=Q+ .
𝑃 𝑃

Substitute

𝑇 𝑅 𝑅
=Q+ + .
𝑃 𝑃 𝑃

Since in modulo-2 arithmetic, 𝑥 + 𝑥 = 0:

𝑅 𝑅
+ =0.
𝑃 𝑃
𝑇
So, = Q , No remainder → frame is divisible by 𝑃.
𝑃
Example:

• Given Message 𝐷 = 1010001101 10 bits

• Pattern 𝑃 = 110101 (6 bits)

• FCS 𝑅 = to be calculated (5 bits)

• Thus 𝑛 = 15, 𝑘 = 10, and (𝑛 − 𝑘) = 5

• The message is multiplied by 25 , yielding 101000110100000.

• This product is divided by 𝑃.


• The remainder is added to the 25 𝐷 to give 𝑇 = 101000110101110, which is transmitted.

• If there are no errors, the receiver receives T intact. The received frame is
divided by P.
Choice of Pattern P

• The generator polynomial 𝑃 is always one bit longer than the desired FCS length.
• The choice of 𝑃 depends on what type of errors must be detected.
• At minimum:
• Highest-order bit of 𝑃 = 1
• Lowest-order bit of 𝑃 = 1
This ensures that 𝑃 always has proper degree and cannot “shrink” during division.

Error Representation

• An error flips one or more bits in the transmitted frame.


• Bit Flip = XOR with 1
• Example 0 ⊕ 1 = 1; 1 ⊕ 1 = 0.
• Thus, errors can be represented as an 𝒏-bit field 𝑬:
1 in position = bit error occurred.
0 in position = no error.
Received Frame

If 𝑇 is the transmitted frame and 𝐸 is the error pattern:


𝑇𝑟 = 𝑇 ⊕ 𝐸
Where:
𝑇 = transmitted frame
𝐸 = error pattern (1s at error positions)
𝑇𝑟 ​ = received frame
⊕ = bit-wise XOR

Error Detection Condition

• Receiver checks if 𝑇𝑟 is divisible by 𝑃.


• Case 1: If 𝐸 = 0 (no error) → clearly divisible by 𝑃.
• Case 2: If 𝐸 ≠ 0:
❑An error goes undetected only if E itself is divisible by 𝑃.
𝐸
❑ Error undetected ⇔ has no remainder
𝑃
Intuition

• For an error to slip through undetected, the error pattern 𝐸 must “look like” a valid multiple
of the generator polynomial 𝑃.

• With a good choice of 𝑃, this is very unlikely.

• That’s why CRCs are powerful: they can catch almost all practical error patterns (single-bit
errors, burst errors, etc.).
What is Interfacing?

• A computer system is made up of different components: CPU, memory, input/output devices,


and communication modules.
• These devices must exchange data.
• However, each device may use different voltage levels, speeds, and data formats.

Interfacing = providing a common way for devices to connect and communicate.

What are Interfacing Standards?

• An interfacing standard is a set of rules and specifications that ensure reliable


communication between devices.
• These standards are defined by international bodies (EIA, IEEE, ISO, ITU-T).
• They cover 4 major aspects:
1. Electrical Characteristics
• Defines how logic 0 and logic 1 are represented in terms of voltage and current.
• Ensures that when one device transmits a signal, the receiver can correctly interpret it.

Examples:
❑ RS-232 (EIA-232F):
• Logic 1 (MARK) = –3V to –15V
• Logic 0 (SPACE) = +3V to +15V
• Note: inverted compared to TTL logic (0V/5V).
❑ I²C:
• Logic 1 = line released (pulled HIGH by resistor, ~5V or 3.3V).
• Logic 0 = line pulled LOW (~0V).
❑ Ethernet:
• Uses differential signaling (two opposite signals on twisted pair).

Key point: Different standards = different voltage ranges. Without a defined electrical
standard, two devices may “talk” in incompatible voltages.
Mechanical Specification
2. Mechanical Characteristics

• Defines the physical connector, number of pins, and their arrangement.


• Ensures that devices can be physically connected without confusion.

Examples:

• RS-232: DB-25 (25 pins) or DB-9 (9 pins).


• X.21: 15-pin connector.
• USB: Type-A, Type-B, Micro-USB, Type-C connectors.
• HDMI: 19-pin connector for audio+video.

Key point : Even if voltage levels are correct, without standard connectors, devices
cannot plug into each other.
Functional
specification
Procedural Specification

Limited Distance Modem

A limited distance modem is used to connect two devices over a short distance (like inside a
building).

It works by:
• Taking digital signals from a computer/terminal (DTE – Data Terminal Equipment),
• Converting them into analog signals,
• Sending them over a medium (e.g., twisted pair cable),
• The other modem converts analog back to digital,
• Sends data to another terminal/computer.

Communication is two-way (data goes in both directions).


Important Interchange Circuits (Wires/Signals Needed)

For simple data exchange, only these circuits are required:

1. Signal Ground (102): Reference ground for signals.

2. Transmitted Data (103): Sends data from DTE → DCE.

3. Received Data (104): Sends data from DCE → DTE.

4. Request to Send (105): DTE asks permission to send data.

5. Clear to Send (106): DCE gives permission to send.

6. DCE Ready (107): Modem (DCE) is ready to operate.

7. Received Line Signal Detector (109): Indicates that remote modem is sending data.
Step-by-Step Working (Half-Duplex Example)

1. DCE Ready:
1. When modem (DCE) is ON, it asserts “DCE Ready” → means modem is working.
2. DTE Wants to Send Data:
1. DTE asserts “Request to Send” (user entered a character).
3. DCE Response:
1. Modem asserts “Clear to Send” → means data can now be sent.
4. Transmission:
1. DTE sends data over the Transmitted Data line.
5. Receiving Data:
1. If remote modem sends data, local modem asserts Received Line Signal Detector.
2. Then it delivers the received data to DTE via Received Data line.

Note: This is asynchronous transmission → timing circuits are NOT needed.


V.24/EIA-232 Dial-Up Operation (Step by Step)

Basic Idea

• Communication happens between two computers (DTEs) using modems (DCEs)


over a telephone line.

• The modem acts as a translator:

DTE (digital signals) → Modem → Analog signals over telephone → Remote


Modem → Remote DTE (digital again).

• Several control signals (pins) are exchanged to set up, manage, and terminate
communication.
Important Pins/Signals in Use

• Pin 20 → DTE Ready (computer ready to send data).


• Pin 2 → Transmitted Data (computer sends data to modem).
• Pin 3 → Received Data (computer receives data from modem).
• Pin 22 → Ring Indicator (modem indicates incoming call).
• Pin 6 → Data Set Ready (modem ready to operate).
• Pin 8 → Carrier Detect (Received Line Signal Detector) (detects signal from remote
modem).
• Pin 4 → Request to Send (DTE asks modem to send).
• Pin 5 → Clear to Send (modem permits sending).
Dial Up Operation (1)
1. DTE A starts communication
• DTE A activates DTE Ready (Pin 20) → tells Modem A that it wants to send data.
• DTE A sends the phone number (dialing command) via Transmitted Data (Pin 2) to
Modem A.

2. Modem B receives incoming call


• Telephone system rings at Modem B.
• Modem B asserts Ring Indicator (Pin 22) → informs DTE B of the call.
• DTE B responds by setting DTE Ready (Pin 20).
• Modem B generates a carrier signal and asserts Data Set Ready (Pin 6) → shows it’s
ready to exchange data.
Dial Up Operation (2)
3. Carrier detection by Modem A
• Modem A detects the carrier signal from Modem B.
• Modem A asserts Carrier Detect (Pin 8) and also informs DTE A that a connection
has been established.
• DTE A may display “ON LINE” message to user.

4. Modem A sends its own carrier

• Modem A now generates its own carrier signal and sends it to Modem B.
• Modem B detects it and informs DTE B using Pin 8 (Carrier Detect).
Dial Up Operation (3)
5. DTE A sends data request

• When ready to send actual data:


• DTE A asserts Request to Send (Pin 4).
• Modem A replies with Clear to Send (Pin 5).
• DTE A now transmits digital data (0s and 1s) via Transmitted Data (Pin 2).
• Modem A modulates these into analog signals and sends over telephone line.

6. Modem B delivers data to DTE B

• Modem B receives analog signals.


• It demodulates them back into digital.
• Data is passed to DTE B via Received Data (Pin 3).
What is a Null Modem?

• A null modem is a special cable/connection used to connect two DTE devices directly (e.g.,
two computers, or a computer and a terminal).

• Normally, communication requires a DTE → DCE → DTE setup (computer → modem →


computer).

• But with a null modem, we trick both DTEs into thinking they are talking to a modem by
crossing over the transmit and receive lines.

It basically eliminates the modem (DCE) and lets two devices talk directly.
Null Modem
How it Works In the diagram, the pins/signals on the left connect to those on the right:
1. Signal Ground (102 → 102):
Common ground for reference.
2. Transmitted Data (103 → 104):
The transmit line of one device is connected to the receive line of the other.
1. (Tx → Rx)
3. Received Data (104 → 103):
The receive line is connected back to the other device’s transmit.
1. (Rx ← Tx)
4. Request to Send (105) Clear to Send (106):
These are looped/crossed so that one device’s request is automatically satisfied by the other’s clear
signal.
5. Received Line Signal Detector (109):
Crossed over so each side thinks the line is active.
6. DCE Ready (107) DTE Ready (108.2):
These are connected so each side believes the other is ready.
7. Ring Indicator (125):
Crossed to simulate incoming calls between the devices.
8. Transmitter Timing (113) Receiver Timing (115):
These are crossed if synchronous timing signals are needed.
Why Use a Null Modem?

• To connect two computers/terminals without modems.


• Useful for short-distance communication (within the same room/building).
• Often used with RS-232 serial ports in old systems.
• Saves cost and complexity since no modem/DCE is needed.

You might also like