5 Error Detection And Control

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.

Error Detection and Control: notes

Error detection techniques

An error means the received bits differ from the sent bits. A single-bit error changes one bit. A burst error changes two or more bits close together.

Detection works by adding redundant bits to the data. The receiver checks them.

  • Parity check: one extra bit makes the number of 1s even (even parity) or odd. It catches any odd number of bit errors but misses an even number. Example: data 1011001 has four 1s, so the even parity bit is 0.
  • Two-dimensional parity: parity for rows and columns. It finds and fixes single-bit errors and catches many burst errors.
  • Checksum: data is split into equal sections and added. The sum is complemented and sent along. The receiver adds everything, and the result must be all 1s. The Internet uses it for IP, TCP and UDP.
  • CRC: the strongest of these, explained below.

Error correction needs more redundancy. The Hamming code can find and fix a single-bit error. For 4 data bits, 3 check bits are used (7-bit code). The check bits $p_1, p_2, p_4$ sit at positions 1, 2 and 4.

Worked example, data 1011 at positions 3, 5, 6, 7:

$$\begin{aligned} p_1 &= d_3 \oplus d_5 \oplus d_7 = 1 \oplus 0 \oplus 1 = 0 \ p_2 &= d_3 \oplus d_6 \oplus d_7 = 1 \oplus 1 \oplus 1 = 1 \ p_4 &= d_5 \oplus d_6 \oplus d_7 = 0 \oplus 1 \oplus 1 = 0 \end{aligned}$$

The code word (positions 1 to 7) is 0110011. If bit 5 flips in transit, the receiver recomputes the three checks. They read $1, 0, 1$ for $p_4 p_2 p_1$, which is binary 101 = 5. So bit 5 is wrong, and the receiver flips it back.

Cyclic Redundancy Check CRC

CRC treats the data as a binary polynomial and divides it by an agreed generator (divisor). The remainder is the CRC. It uses modulo-2 arithmetic, where addition and subtraction are both XOR and there are no carries.

At the sender:

  • Append $n$ zeros to the data, where the divisor has $n+1$ bits.
  • Divide by the divisor using XOR.
  • The remainder is the CRC. Replace the added zeros with it.

At the receiver, the full frame is divided by the same divisor. A remainder of zero means no error was found.

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 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 segmentXOR withResultBring down
110110110110+1 โ†’ 1101
110110110110+0 โ†’ 1100
110010110111+0 โ†’ 1110
111010110101+1 โ†’ 1011
101110110000+0 โ†’ 0000
0000(leading 0, no XOR)000end

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

RemainderDecision
000No error - accept the frame
non-zeroError detected - reject / retransmit

Since the remainder is 000, the receiver concludes the frame was received without error.


Summary

ParameterValue
Message11011001
Generator ($x^3+x+1$)1011
Appended message11011001000
CRC (remainder)000
Transmitted frame11011001000
Receiver remainder000 โ†’ No error
Open this answer on its own page โ†’

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]

  • Message $M$ = 1001100 - Generator polynomial: $x^3 + 1$ โ†’ 1001 - Degree $r = 3$ Append 3 zeros to the message: $$1001100 \rightarrow 1001100000$$ I carry out the division carefully, XOR-ing whenever the leading bit is 1. Do it bit-by-bit with a running remainder: Cleaner alignment (quotient bit...
Open this answer on its own page โ†’

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 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 inWindow beforeMSB=1? XOR 111Window after
1001no (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)

Open this answer on its own page โ†’

Error detection techniques

2081 ยท 5 marks

Explain any one error control technique. [5]

Error control refers to the mechanisms used in data communication to detect and correct errors that occur during transmission. One widely used error control technique is ARQ (Automatic Repeat reQuest), and the simplest form of ARQ is Stop-and-Wait ARQ. --- Stop-and-Wait ARQ is a flow and error co...

Open this answer on its own page โ†’

Reliable and unreliable protocols

2080 ยท 5 marks

Write short notes on Reliable Protocol and Satellite Network [5]

Show solved 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:

TypeAltitudeLatencyExample Use
GEO (Geostationary)~36,000 kmHigh (~270 ms)TV broadcast, weather
MEO (Medium Earth Orbit)5,000-20,000 kmMediumGPS
LEO (Low Earth Orbit)500-2,000 kmLowStarlink, 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.

Open this answer on its own page โ†’

2080.2 ยท 5 marks

Differentiate between reliable and unreliable protocol. Provide example of each. How does protocol check for errors? [5]

A reliable protocol is a communication protocol that guarantees delivery of data from sender to receiver. It ensures that: - Data arrives without errors - Data arrives in order - No data is lost or duplicated - The sender receives an acknowledgement (ACK) from the receiver Example: TCP (Transmiss...

Open this answer on its own page โ†’

Stop-and-Wait ARQ design

2079 ยท 10 marks

Explain the design of Stop-and-Wait ARQ. Illustrate with suitable flow diagram example[10]

ARQ (Automatic Repeat reQuest) is an error-control mechanism used in data link layer and transport layer protocols. It combines error detection with retransmission to ensure reliable data delivery over an unreliable channel. Stop-and-Wait ARQ is the simplest form of ARQ protocol where the sender ...

Open this answer on its own page โ†’

Selective Repeat ARQ design

2080.2 ยท 10 marks

Explain the design of Selective Repeat ARQ. Illustrate with suitable flow diagram example[10]

Selective Repeat ARQ (Automatic Repeat reQuest) is a sliding window protocol used in data link layer and transport layer for error control. Unlike Go-Back-N ARQ, it retransmits only the erroneous or lost frames, not all subsequent frames. This makes it more efficient in high-error-rate environmen...

Open this answer on its own page โ†’