25-Comp-B5 Computer Communications · December 2014
Question 4 of 7: Cyclic Redundancy Check (CRC)
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
98-Comp-B5, Computer Communications — National Exams, December 2014. Closed-book, 3 hours; seven questions of equal value (20% each); ANY FIVE constitute a complete exam (all seven answered below as a complete study resource).
Reference texts: Stallings, Data and Computer Communications, 10th ed. — the OSI reference model (Ch.2, Q1), multiplexing/FDM (Ch.8, Q3), spread spectrum (Ch.9, Q6), and physical/link-layer terminology (Ch.3, 9, 11, 17, Q7); Kurose & Ross, Computer Networking: A Top-Down Approach, 7th ed. — throughput and bit-rate fundamentals (Ch.1, Q2), error detection via CRC (Ch.5, Q4), the Web/HTTP/URL (Ch.2, Q5), and TCP/IP (Ch.1, Q7).
Find. The CRC — the $r$-bit remainder appended to $M$ to form the transmitted frame.
Approach. Determine the redundancy length $r = \deg(P)$; append $r$ zero bits to $M$; perform binary mod-2 (XOR-only, no-borrow) polynomial division of the augmented message by $P$; the final $r$-bit remainder is the CRC.
Augmented dividend. Append $r=5$ zero bits to $M$ (equivalent to $M \cdot 2^{r}$):
$$M \cdot 2^{r} = 11100011\underbrace{00000}_{5\ \text{zeros}} = 1110001100000\ (13\ \text{bits}).$$
Mod-2 division by $P=110011$. Working left to right across the 8 possible alignments ($13-6+1=8$), XOR with $P$ whenever the current leading bit is 1, otherwise bring the next bit down unchanged:
Mod-2 (XOR) division trace
Position
Leading bit
Action
Working register after this step
0
1
XOR with $P$
0010111100000
1
0
bring down
0010111100000
2
1
XOR with $P$
0001110000000
3
1
XOR with $P$
0000010110000
4
0
bring down
0000010110000
5
1
XOR with $P$
0000001111100
6
1
XOR with $P$
0000000011010
7
0
bring down
0000000011010
Two independent implementations (a bitwise sliding-window XOR pass, and an integer shift-and-XOR pass) agree on every intermediate row.
Remainder = CRC. The final 5 bits of the working register are the remainder:
$$\text{CRC} = \boxed{11010}.$$
Self-check. The transmitted frame is $T = M \Vert \text{CRC} = 1110001111010$. Dividing $T$ by $P$ (mod-2) gives a remainder of $00000$, confirming $T$ is exactly divisible by $P$ as required for a valid CRC codeword.