CS FundamentalsVery hardGATE CS

A router decrements TTL from 0x3F to 0x3E in a packet whose header checksum is 0xB1E6 (the 16-bit word holding TTL and protocol changes from 0x3F11 to 0x3E11). Using the incremental update HC' = ~(~HC + ~m + m') in ones'-complement arithmetic, what is the new checksum?

  1. A. 0xB0E6
  2. B. 0xB2E6
  3. C. 0xB1E6
  4. D. 0xB1E7

Correct answer: B. 0xB2E6

The covered sum drops by 0x0100, so its complement (the checksum) rises by 0x0100: 0xB1E6 → 0xB2E6. Subtracting 0x100 from the checksum moves it the wrong way; leaving it unchanged would make the next hop discard the packet.

More Computer Networks questions

Exams that ask this topic