PadhaikoAll subjects

Past exam question: 2078 Bhadra, Q5

Data Communication · 8 marks

Open in the Padhaiko app

Topic: Wireless propagation (Introduction to groundwave propagation, sky…

Question

Demonstrate how checksum is used to detect errors while sending a data word of 12, 15, 15, 10, 5, 2.

Solution

Checksum Principle Using 1's Complement Arithmetic: The internet checksum algorithm (used in IP, TCP, and UDP) operates by:

  1. Treating data words as integers of fixed bit-width (here, 4-bit nibbles, since data values fit in 4 bits: ).
  2. Computing the sum of all words using 1's complement addition (any end-around carry from the most significant bit is added back into the least significant bit).
  3. The checksum is the 1's complement (bitwise NOT) of this accumulated sum.
  4. The sender transmits the data words along with the checksum.
  5. The receiver adds all received data words plus the checksum in 1's complement. If the result is all 1s (or zero after inverting), the data is accepted as error-free.

Transmitter Checksum Generation (4-bit Words): The given data items in decimal and 4-bit binary are:

  1. Calculate the standard decimal sum:
  1. Convert sum to binary:
  1. Wrap around the carry bits (1's complement fold):
    • The 4-bit sum is with carry ().
    • Add carry to lower 4 bits:
  1. Compute Checksum (1's complement inversion):

Transmitted payload: .

Receiver Error Detection Verification:

  1. Case 1: No Transmission Error: The receiver sums all incoming items including the checksum:

Fold carry bits:

Take 1's complement:

Since the inverted sum is strictly (uninverted sum is all 1s), the receiver confirms no error and accepts the transmission.

  1. Case 2: Error Detected: Suppose is corrupted from to during transit.

Fold carry:

Take 1's complement:

Since the result is non-zero, the receiver detects the transmission error and rejects the corrupted frame.

Answer:

Using 4-bit 1's complement arithmetic for :

All past exam questions for Data Communication