Skip to main content

Checksum error detection

Short answer

In 4-bit one’s complement checksum, sum of data = 59 (111011). Wrap carry (11) into low 4 bits: 1011+11=1110. Complement is 0001, so checksum = 1. Receiver adds all words (including checksum), wraps, and complements; 0 means no error.

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

The checksum method adds the data words using one's complement arithmetic; the complement of the sum is sent as an extra word. The receiver adds all words including the checksum and complements; a result of 0 means no error.

Data words are 12, 15, 15, 10, 5, 2, so the largest is 15 and a 4-bit word size is the natural choice (sums wrap around in 4 bits).

Sender

Binary values: 12 = 1100, 15 = 1111, 15 = 1111, 10 = 1010, 5 = 0101, 2 = 0010.

Sum = 12 + 15 + 15 + 10 + 5 + 2 = 59 = 111011 (6 bits).

  • Wrap around: the carry bits (11 = 3) are added to the low 4 bits (1011 = 11): 11 + 3 = 14 = 1110.
  • Checksum = complement of 1110 = 0001 = 1.

Transmitted: 12, 15, 15, 10, 5, 2, 1.

Receiver (no error)

Sum = 59 + 1 = 60 = 111100. Wrap: 1100 + 11 = 12 + 3 = 15 = 1111. Complement = 0000, so the data is accepted.

Receiver (with error)

If 10 becomes 11 in transit: sum = 61 = 111101 → 1101 + 11 = 13 + 3 = 16 = 10000 → wrap again: 0000 + 1 = 0001. Complement = 1110 ≠ 0, so the error is detected and the data is rejected.

Answer: checksum = 1 (binary 0001); receiver result = 0 means accepted.

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 8 questions →