---
title: "Cyclic Redundancy Code with example"
subject: "Instrumentation II"
chapter: 3
key: "semester_5/instrumentation_ii:crc-example"
source: https://www.bctengineer.com/q/semester_5/instrumentation_ii/crc-example
site: BCT Engineering
---

# Cyclic Redundancy Code with example

Instrumentation II · Chapter 3: Serial Interfacing With Microprocessor Based System

- Asked in: 2076 Chaitra, 4 marks
- Video: [Cyclic Redundancy Check (CRC) - Part 1](https://www.youtube.com/watch?v=A9g6rTMblz4) — Neso Academy
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/instrumentation_ii/crc-example
- Whole chapter: https://www.bctengineer.com/md/semester_5/instrumentation_ii/chapter-3

## Question

Explain Cyclic Redundancy Code with suitable example.

## Short answer

CRC appends a remainder from XOR division of data (with r appended zeros) by a generator polynomial. The receiver divides the received frame; zero remainder indicates no error. For data 1101011011 and generator 10011, the 4-bit CRC is 1110; transmitted frame is 11010110111110.

## Answer

**Cyclic Redundancy Check (CRC)** is an error detecting code. The sender treats the data bits as a binary polynomial, divides it (modulo-2, i.e. XOR) by an agreed **generator polynomial** G(x), and appends the remainder (the CRC) to the data. The receiver divides the whole received frame by G(x): a zero remainder means no error (probably), a non-zero remainder means error.

#### Procedure
1. Choose generator of r+1 bits (degree r).
2. Append r zeros to the data.
3. Divide (XOR division) by the generator; the r-bit remainder is the CRC.
4. Send data + CRC (data followed by the CRC).

#### Example
Data = 1101011011, generator = 10011 (x^4 + x + 1), r = 4. Message after appending 4 zeros: **11010110110000**.
```text
 11010110110000
 10011                    XOR
 -------------
 01001110110000
  10011                   XOR  (bring down, leading bit 1)
 -------------
 00000010110000
       10011
 -------------
 00000000101000
         10011
 -------------
 00000000001110   remainder
```
CRC = **1110**. Transmitted frame: 1101011011**1110**.

#### Check at the receiver
Divide 11010110111110 by 10011: the remainder is 0000, so the frame is accepted. If a bit changes (for example the third bit flips), the remainder is not zero and the error is detected.

#### Properties
Detects all single-bit and double-bit errors, all odd numbers of errors (if G has factor x+1), all burst errors shorter than r+1 bits, and most longer bursts. Implemented with shift registers and XOR gates. Common generators: CRC-16 (x^16 + x^15 + x^2 + 1), CRC-CCITT (x^16 + x^12 + x^5 + 1), CRC-32 (Ethernet).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does the receiver do to check a CRC frame?
   A. Compares clocks
   B. Adds bytes
   C. Counts ones
   D. Divides the whole frame by the generator; zero remainder means no error
   Answer: D. A non-zero remainder reveals an error. (Key point: Purpose)

2. Before dividing, what is done to the data for generator of degree r?
   A. Remove r bits
   B. Append r ones
   C. Append r zeros
   D. Invert data
   Answer: C. r zeros are appended and the remainder becomes the CRC. (Key point: Procedure)

3. What kind of division is used?
   A. Multiplication
   B. Modulo-2 (XOR) division
   C. Decimal division
   D. Subtraction with borrow
   Answer: B. CRC division uses XOR with no borrows. (Key point: Arithmetic)

4. CRC detects all burst errors shorter than?
   A. 2 bits
   B. 8 bits
   C. r+1 bits
   D. r-1 bits
   Answer: C. All bursts shorter than r+1 bits are detected. (Key point: Burst errors)

## Related in other subjects

- [Redundancy, Hamming distance, linear vs cyclic](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Aredundancy-hamming-linear-cyclic) — Data Communication, chapter 8
- [(7,4) cyclic code with g(x) = x³ + x² + 1 for 1011](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Acyclic-code-7-4-1011-x3x2) — Communication Systems, chapter 8, asked 2×
- [Hamming weight and distance; (7,4) cyclic code for 1011](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Ahamming-weight-cyclic-1011) — Communication Systems, chapter 8, asked 2×
- [Convolutional vs block codes; (7,4) cyclic code for 1011](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aconv-vs-block-cyclic-7-4-1011) — Communication Systems, chapter 8, asked 2×
