# Q6(a) · CRC

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q6a

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6a/

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q6(a). Consider data generated at sender 110101 and CRC polynomial x^3+x+1. Calculate i) CRC code generated at the sender side ii) Final message transmitted from sender to receiver iii) Show message is received without error at receiver. [10 marks]

### Answer

### Given

Data = 110101; generator bits = 1011; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check.

### Formula and why

Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.

### Step 1. Append zeros

110101 → 110101000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 110101000 | 101100000 | 011001000 |
| 2 | 011001000 | 010110000 | 001111000 |
| 3 | 001111000 | 001011000 | 000100000 |
| 4 | 000100000 | 000101100 | 000001100 |
| 6 | 000001100 | 000001011 | 000000111 |

### Step 3. Build the frame

Remainder = **111**. Transmit **110101111**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 110101111 | 101100000 | 011001111 |
| 2 | 011001111 | 010110000 | 001111111 |
| 3 | 001111111 | 001011000 | 000100111 |
| 4 | 000100111 | 000101100 | 000001011 |
| 6 | 000001011 | 000001011 | 000000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.
