Computer Networks · TEE · papers
Q5(c) · 8-bit checksum
2024-02-06 · AI-only Sem V variant
Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.
Q5(c). For data 10101001 00111001, show sender and receiver steps for an 8-bit checksum. [5 marks]
Answer
Given
10101001, 00111001; word width = 8 bits.
To find
Sender checksum and receiver verification.
Formula and why
S=\operatorname{endAroundCarry}(\text{sum of words}),\qquad C=\operatorname{NOT}(S)One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.
Solution
Step 1. Add the words, folding each carry
| Word | Decimal | Raw addition | Folded addition | Running binary sum |
|---|---|---|---|---|
| 10101001 | 169 | 169 | 169 + carry 0 = 169 | 10101001 |
| 00111001 | 57 | 226 | 226 + carry 0 = 226 | 11100010 |
Step 2. Complement every bit
Running sum = 11100010. Change every 0 to 1 and every 1 to 0: checksum = 00011101 (decimal 29).
Step 3. Receiver adds the data and checksum
226 + 29 = 255 = 11111111. All bits are 1; complement gives all zeros. Therefore this intact message passes the checksum check. A matching checksum detects no error; it does not prove that every possible corruption is absent.