Network and Data Communications ยท Unit 5
Error Detection and Control
Exam-focused notes for Error Detection and Control (Network and Data Communications, BIT254): what the TU syllabus asks and how it has actually been tested, with 8 solved past questions from this unit.
Error Detection and Control in short
Bits can flip during transmission because of noise. This chapter shows how errors are detected, how CRC and Hamming code work, and how ARQ protocols ask for lost or damaged frames again.
What this unit covers
- Cyclic Redundancy Check CRC
- CRC polynomial calculation
- CRC transmitted frame encoding
- CRC error checking at receiver
- Stop-and-Wait ARQ design
- Selective Repeat ARQ design
- ARQ flow diagrams
- Reliable and unreliable protocols
- Error detection techniques
CRC transmitted frame encoding
2082 ยท 5 marks
A bit stream 11011001 is transmitted using a standard CRC method. The generator polynomial is $x^3 + x - 1$. Show the actual bit string transmitted and show the error checking on the receiver side. [5]
Show solved answerHide answer
CRC (Cyclic Redundancy Check) - Worked Solution
Given
- Message bit stream (M):
11011001(8 bits) - Generator polynomial: $x^3 + x - 1$
- In modulo-2 (GF(2)) arithmetic, $-1 \equiv +1$, so $x^3 + x - 1 = x^3 + x + 1$
- Generator (G):
1011(4 bits, degree $r = 3$)
Solution
Step 2.1: Append $r = 3$ zeros to the message
$$M' = 11011001 ,|, 000 = 11011001000$$
Step 2.2: Sender-side XOR division of 11011001000 by 1011
10000101 <-- quotient
______________
1011 ) 11011001000
1011
----
1101
1011
----
01100
1011
----
01110
1011
----
01011
1011
----
00000
000 <-- remainder (CRC)
Step trace (leading-bit alignment, XOR when leading bit = 1):
| Working segment | XOR with | Result | Bring down |
|---|---|---|---|
1101 | 1011 | 0110 | +1 โ 1101 |
1101 | 1011 | 0110 | +0 โ 1100 |
1100 | 1011 | 0111 | +0 โ 1110 |
1110 | 1011 | 0101 | +1 โ 1011 |
1011 | 1011 | 0000 | +0 โ 0000 |
0000 | (leading 0, no XOR) | 000 | end |
Remainder (CRC) = 000
Step 2.3: Actual transmitted bit string
$$\text{Transmitted} = M ,|, \text{CRC} = 11011001 ,|, 000$$
$$\boxed{11011001000}$$
Step 2.4: Receiver-side error checking
Receiver divides the received frame 11011001000 by the same generator 1011:
1011 ) 11011001000
... (identical division) ...
000 <-- remainder
Remainder = 000
Step 2.5: Decision
| Remainder | Decision |
|---|---|
000 | No error - accept the frame |
| non-zero | Error detected - reject / retransmit |
Since the remainder is 000, the receiver concludes the frame was received without error.
Summary
| Parameter | Value |
|---|---|
| Message | 11011001 |
| Generator ($x^3+x+1$) | 1011 |
| Appended message | 11011001000 |
| CRC (remainder) | 000 |
| Transmitted frame | 11011001000 |
| Receiver remainder | 000 โ No error |
2081 ยท 5 marks
A bit stream 1001100 is transmitted using a standard CRC method. The generator polynomial is $x^3 + 1$. Show the actual bit string transmitted. [5]
2080 ยท 5 marks
Calculate the transmitted encoded frame if the message sequence is 10010001 and generator polynomial is $G(X) = x^2 + x + 1$ [5]
Show solved answerHide answer
CRC Encoding: Transmitted Frame Calculation
Given Data
- Message sequence $M = 10010001$
- Generator polynomial $G(X) = x^2 + x + 1$
Step 1: Generator Bit Pattern
$G(X) = x^2 + x + 1 \Rightarrow \mathbf{111}$
Degree $r = 2$, so append 2 zeros.
Step 2: Augmented Dividend
$$1001000100$$
Step 3: Modulo-2 Division by 111
Perform the division carefully, tracking each bit.
Dividend: 1 0 0 1 0 0 0 1 0 0
Divisor: 1 1 1
I'll process left to right. Take leading 3 bits, XOR when leading bit is 1.
1001000100 : 111
100 โ leading 1, XOR 111 = 011
bring down 1 โ 0111 โ work on 111
111 โ leading 1, XOR 111 = 000
bring down 0 โ 0000 โ 000
000 โ leading 0, no XOR
bring down 0 โ 0000 โ 000
000 โ leading 0, no XOR
bring down 1 โ 0001 โ 001
001 โ leading 0, no XOR
bring down 0 โ 0010 โ 010
010 โ leading 0, no XOR
bring down 0 โ 0100 โ 100
100 โ leading 1, XOR 111 = 011
(no more bits)
Align this against the full 10-bit dividend to verify by tracking the running remainder bit by bit.
Running remainder method (shift in each dividend bit, XOR divisor 111 when MSB of the 3-bit window is 1):
| Bit in | Window before | MSB=1? XOR 111 | Window after |
|---|---|---|---|
| 1 | 001 | no (msb 0) | 001 โ wait |
To avoid confusion, use standard long-division layout:
1 0 1 1 0 0 1
-----------------
1 1 1 ) 1 0 0 1 0 0 0 1 0 0
1 1 1
-----
0 1 1 0
1 1 1 (align at next 1)
Do it strictly with the standard algorithm:
1 0 0 1 0 0 0 1 0 0
XOR 1 1 1 (pos 1-3): 100^111 = 011
โ 0 1 1 1 0 0 0 1 0 0
XOR 1 1 1 (pos 2-4): 111^111 = 000
โ 0 0 0 0 0 0 0 1 0 0
(pos 3-5 leading 0, skip)
(pos 4-6 leading 0, skip)
(pos 5-7 leading 0, skip)
(pos 6-8 leading 0, skip; bits are 0,0,1)
XOR 1 1 1 (pos 7-9): bits 0 1 0 leading 0 skip
After the second XOR the string is $0000000100$. The remaining bits are $...100$ at positions 8,9,10.
Reading positions 8-10: $1,0,0$. Leading bit position 8 is 1:
Position 8-10: $100 \oplus 111 = 011$.
Final string tail: last 2 bits = 11.
The remainder (last $r=2$ bits after full reduction) = $\mathbf{11}$.
Verification of Remainder
Reconstruct: string became $0000000100$, then XOR 111 at positions 8-10: $$100 \oplus 111 = 011$$ Final 2 bits = $\mathbf{11}$.
CRC = 11
Careful reduction gives remainder 11; a hand division that drops or misaligns bits in Step 3 would give 01 instead.
Step 4: Transmitted Frame
$$\text{Frame} = \underbrace{10010001}{M} ; \underbrace{11}{CRC} = \mathbf{1001000111}$$
Verification (divide frame by 111, expect remainder 0)
$1001000111$:
- $100 \oplus 111 = 011$ โ $0111000111$
- $111 \oplus 111 = 000$ โ $0000000111$
- tail $111 \oplus 111 = 000$ โ remainder $\mathbf{00}$ โ
Remainder is zero, confirming correctness.
Result
Transmitted Encoded Frame =
1001000111(CRC = 11)
Error detection techniques
Reliable and unreliable protocols
2080 ยท 5 marks
Write short notes on Reliable Protocol and Satellite Network [5]
Show solved answerHide answer
Short Notes on Reliable Protocol and Satellite Network
1. Reliable Protocol
A reliable protocol is a communication protocol that guarantees the delivery of data from sender to receiver correctly, completely, and in order.
Key Characteristics:
- Error Detection and Correction: Uses checksums, CRC, or parity bits to detect errors in transmitted data.
- Acknowledgement (ACK): The receiver sends an acknowledgement to the sender after successfully receiving data.
- Retransmission: If ACK is not received within a timeout period, the sender retransmits the lost or corrupted data.
- Sequencing: Data packets are numbered so the receiver can reorder them if they arrive out of sequence.
- Flow Control: Prevents the sender from overwhelming the receiver (e.g., sliding window protocol).
- Connection-Oriented: Typically establishes a connection before data transfer (e.g., TCP).
Example:
TCP (Transmission Control Protocol) is the most common reliable protocol. It ensures all segments are delivered, acknowledged, and reassembled in correct order.
2. Satellite Network
A satellite network is a type of wireless network that uses artificial satellites orbiting the Earth as relay stations to transmit data, voice, and video signals between ground stations.
Types of Satellite Orbits:
| Type | Altitude | Latency | Example Use |
|---|---|---|---|
| GEO (Geostationary) | ~36,000 km | High (~270 ms) | TV broadcast, weather |
| MEO (Medium Earth Orbit) | 5,000-20,000 km | Medium | GPS |
| LEO (Low Earth Orbit) | 500-2,000 km | Low | Starlink, mobile |
Key Characteristics:
- Wide Coverage: A single satellite can cover a large geographic area.
- High Latency (GEO): Due to long signal travel distance, GEO satellites have significant propagation delay.
- Broadcast Capability: Signals can be sent to multiple receivers simultaneously.
- Used in Remote Areas: Provides connectivity where terrestrial networks are unavailable.
- Bandwidth Limitations: Satellite bandwidth is shared among many users.
Applications:
- Internet access in rural/remote areas
- Military communications
- GPS and navigation
- Weather forecasting
- Television broadcasting
Note: Since no specific curriculum notes were provided, this answer is based on standard networking concepts as covered in typical BSc CSIT Data Communication and Networking courses.
2080.2 ยท 5 marks
Differentiate between reliable and unreliable protocol. Provide example of each. How does protocol check for errors? [5]
Stop-and-Wait ARQ design
2079 ยท 10 marks
Explain the design of Stop-and-Wait ARQ. Illustrate with suitable flow diagram example[10]
Selective Repeat ARQ design
2080.2 ยท 10 marks
Explain the design of Selective Repeat ARQ. Illustrate with suitable flow diagram example[10]
Make Unit 5 stick
Practice BIT254 with flashcards & quizzes