All 32 questions UPSC has asked on error control coding in the Electrical Engineering Optional (Paper II, Digital Communication) from 2000 to 2026, solved step by step – latest first.
Try them yourself first: the same questions, without solutions, are on our Digital Communication topic-wise PYQs page. Circuit diagrams have been redrawn from the question papers.
How we check these solutions
These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:
- ✓ Checked by computer the numbers were worked out again independently in code (SymPy and NumPy: circuit equations, power balance, matrices, integrals).
- ✓ Proof checked step by step or ✓ Derivation checked step by step for “prove” and “derive” questions, every step was checked against the definitions and standard results.
- ✓ Answer checked step by step for theory and descriptive questions, every point was checked against the standard theory.
Where a printed question is wrong, unclear or incomplete, we say so and solve the intended version.
Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.
Jump to a question (year · question number):
2026 · 7b(ii) 2025 · 1e 2025 · 8b 2023 · 4a 2022 · 5e 2022 · 7a 2021 · 2c 2021 · 8a(i) 2021 · 8a(ii) 2020 · 1e 2020 · 5e 2020 · 8b 2019 · 8a(ii) 2019 · 8a(iii) 2018 · 5c(i) 2017 · 6a 2016 · 4c(i) 2016 · 6c(i) 2015 · 5e 2015 · 8c 2014 · 6c 2013 · 4c(i) 2013 · 6c(ii) 2012 · 3c(i) 2012 · 5f(i) 2012 · 7b(i) 2011 · 4b(i) 2011 · 7c(i) 2010 · 6c 2009 · 7c 2006 · 1d 2000 · 4b
A parity check code has the parity check matrix: I. Determine the generator matrix . II. Find the code word that begins with 101… . III. Suppose that the received word is 110110. Decode this received word.
Solution
I. Generator matrix
H has the systematic form , with the message in the first three positions:
II. Codeword beginning with 101
III. Decoding 110110
The syndrome is
This equals the 2nd column of H, . So there is a single error in bit 2.
- Corrected word: 100110, i.e. message 100.
- Check: ✓.
✓ Checked by computer We derived G and decoded the received word by syndrome in Python.
If the generator polynomial is and the message bits are 1101101, then obtain the CRC code.
Solution
Data
Procedure
Append four zeros, giving 1101101 0000, and divide (modulo 2) by 10011. The successive XOR steps (bit position: segment ⊕ 10011 → result) are:
| Step | Segment | ⊕ 10011 → |
|---|---|---|
| 1 | 11011 | 01000 |
| 2 | 10000 | 00011 |
| 3 | 11100 | 01111 |
| 4 | 11110 | 01101 |
| 5 | 11010 | 01001 |
Remainder (CRC): 1001
Transmitted CRC codeword:
At the receiver, dividing 11011011001 by 10011 leaves a zero remainder if there are no errors.
✓ Checked by computer We carried out the polynomial division in Python.
Draw the diagram of a 1/3 rate convolution encoder. Write the corresponding code tree for the 1/3 rate convolution encoder.
Solution
Rate-1/3 convolutional encoder
The question does not specify the generators. We take a standard rate-1/3, constraint-length-3 code with , , :
- one input bit enters a 2-stage shift register;
- three modulo-2 adders form the outputs , , ;
- a commutator sends for each input bit, giving 3 output bits per input bit (rate 1/3).
Code tree
- Start at the root, in state 00.
- At each node, the upper branch corresponds to input 0 and the lower branch to input 1. Each branch is labelled with the 3-bit output, and the next state is shown.
- After K = 3 levels, the tree repeats: nodes with the same state have identical subtrees. This is why the tree can be collapsed into a trellis.
Example: the input 101 follows lower, upper, lower branches, giving 111 001 100.
✓ Answer checked step by step Encoder chosen with g1 = 100, g2 = 101, g3 = 111; tree generated in Python.
Consider a systematic linear block code with binary elements whose parity check equations are where are message digits and are parity check digits. (i) Find the generator matrix and parity check matrix for the code. (ii) How many errors can this code detect? How many errors can be corrected? (iii) If 10100100 is the received code word, find the corresponding transmitted code word assuming that single-bit error has been made during transmission.
Solution
(i) Generator and parity-check matrices ()
(Row shows which parity bits contain .)
(ii) Error capability
Listing the 16 codewords gives (every non-zero codeword has weight 4 or 8). So it can:
- detect up to errors;
- correct error (and simultaneously detect double errors).
(iii) Decoding 10100100
This matches the 8th column of H, the position. So the error is in the last bit.
- Corrected codeword: 10100101, i.e. message 1010.
- Check: ✓.
✓ Checked by computer We built G and H, found dmin and decoded the received word in Python.
Prove that all vectors in the same coset have the same syndrome that is unique to that coset in the standard array for any linear block code.
Solution
Standard array
For an linear code , the n-tuples are arranged in rows (cosets). Each row is
where the coset leader is a minimum-weight vector not in an earlier row.
(a) All vectors in a coset have the same syndrome
Take any two vectors in the coset of : and . Since every codeword satisfies :
So every vector in the coset has the syndrome , the syndrome of its coset leader.
(b) Different cosets have different syndromes
Suppose two cosets with leaders (in different rows) had the same syndrome:
Then would lie in the coset of . But the standard array is built so that each new leader is chosen from vectors not already in any earlier row, so this is impossible. Hence distinct cosets have distinct syndromes.
Conclusion: the syndrome is the same for all vectors of a coset, and unique to that coset. There are exactly syndromes for the cosets. The decoder can therefore identify the coset, and hence the most likely error pattern (the coset leader), from the syndrome alone. ∎
✓ Proof checked step by step We proved the result step by step.
The figure below shows the encoder for a rate , constraint length convolutional code: (i) Determine the encoder output produced by the message sequence 11011 … . (ii) Also, construct the code tree for the encoder. Trace the path through the tree that corresponds to the message 11011 … . Compare the resulting output with that determined in (i).
Solution
Generators (from the figure)
- Upper adder: input + FF1 + FF2 + FF3, so , i.e. .
- Lower adder: input + FF1 + FF3, so , i.e. .
(i) Encoder output for 11011 (followed by three 0s to flush the register)
with . Interleaving the two outputs:
| Input | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|---|
| Output | 11 | 00 | 01 | 10 | 11 | 01 | 01 | 11 |
Output: 11 00 01 10 11 01 01 11
(ii) Code tree and path for 11011
From the root, the path goes lower (1), lower (1), upper (0), lower (1), lower (1). The branch labels along it read 11, 00, 01, 10, 11, the same as the first five output pairs in (i). (The flushing zeros continue the path along upper branches: 01, 01, 11.)
✓ Checked by computer We encoded the message and traced the tree path in Python.
A convolutional code is described by Find the transfer function and the free distance for this code. Also verify whether or not this code is catastrophic.
Solution
Encoder and state diagram (; state = last two inputs)
Transfer function
Split state 00 into a start and an end node. Label each branch , where is the output weight and the input bit. Solving the state equations:
With :
Free distance: the lowest power of D is 7, so
There is one path of weight 7: input 1 followed by zeros, output 111 101 011.
Catastrophic?
Their greatest common divisor is 1, since is irreducible and not divisible by . Equivalently, the only zero-output-weight loop in the state diagram is the self-loop at state 00: the loop at 11 has output 001, of weight 1. So the code is not catastrophic.
✓ Checked by computer We obtained the transfer function symbolically and the free distance by search in Python.
Prove that the minimum distance of any linear block code satisfies .
Solution
Proof
Consider a linear code in systematic form, . Take a message with a single 1, e.g. . Its codeword is
Its weight is
because at most all parity bits can be 1.
For a linear code, equals the minimum weight of the non-zero codewords. So
(Alternative, for any code with codewords: delete the first positions of every codeword. The shortened words are still all distinct, since two codewords differ in at least places. There are distinct words of length , so , i.e. .)
Hence
the Singleton bound. Codes achieving equality are maximum-distance-separable (MDS), e.g. Reed–Solomon codes. ∎
✓ Proof checked step by step We proved the Singleton bound step by step.
Show that the minimum Hamming distance of a linear block code is equal to the minimum number of columns of its parity check matrix that are linearly dependent. From this conclude that the minimum Hamming distance of a Hamming code is always equal to 3.
Solution
equals the smallest number of linearly dependent columns of H
Let be the columns of . A vector is a codeword if and only if :
- If is a codeword of weight , with non-zero entries at positions , then . So these columns are linearly dependent.
- Conversely, if some columns are linearly dependent, i.e. sum to zero (in GF(2)), the vector with 1s in those positions satisfies . It is a codeword of weight .
So the minimum weight of a non-zero codeword, which for a linear code equals , is the smallest number of columns of H that are linearly dependent.
Hamming codes have
For a Hamming code, with and , the columns of H are all the distinct non-zero r-tuples.
- No column is zero, so no single column is dependent: .
- All columns are distinct, so no two columns sum to zero: .
- But for any two columns and , their sum is also a non-zero r-tuple, and hence another column of H. So : three columns are dependent.
Hence for every Hamming code. It corrects all single errors (and is a perfect code). ∎
✓ Proof checked step by step We proved both results step by step.
For a linear block code over GF(3), the generator matrix (G) is given by (i) Determine all right code words for this code. (ii) How many errors can this code correct?
Solution
Codewords
where and .
| Codeword | Weight | |
|---|---|---|
| (0, 0) | 0000 | 0 |
| (0, 1) | 1202 | 3 |
| (0, 2) | 2101 | 3 |
| (1, 0) | 1021 | 3 |
| (1, 1) | 2220 | 3 |
| (1, 2) | 0122 | 3 |
| (2, 0) | 2012 | 3 |
| (2, 1) | 0211 | 3 |
| (2, 2) | 1110 | 3 |
(i) There are codewords, listed above.
(ii) The minimum non-zero weight is 3, so . The code corrects
(any single symbol error).
✓ Checked by computer We listed the codewords over GF(3) in Python.
(i) Write down Hamming bound condition for code C(n, k) of size M in GF(q), which can correct t errors. (ii) Explain perfect code using Hamming bound condition in GF(2). (iii) Check whether n-repetition code (for odd value of n) is perfect code or not.
Solution
(i) Hamming (sphere-packing) bound
A code of length with codewords over GF(q) that corrects errors must have non-overlapping spheres of radius around its codewords. Each sphere contains vectors, and there are only vectors in all:
For a linear code, .
(ii) Perfect code (GF(2))
For binary codes:
A perfect code meets the bound with equality. The spheres of radius around the codewords exactly fill the space, so every received vector is within distance of exactly one codeword. Every syndrome corresponds to a correctable error pattern of weight at most , and no others.
Example: Hamming codes (, ): ✓. The (23, 12) Golay code () is also perfect.
(iii) The n-repetition code (n odd)
- codewords (all 0s, all 1s), , and , so .
- Left side:
using the symmetry : for odd , the first half of the binomial sum is exactly half of .
- This equals the right side, .
So the odd-length repetition code is a perfect code. Every received word is decoded by majority vote to the nearer of the two codewords. ∎
✓ Proof checked step by step We stated the bound and checked the repetition code step by step.
(i) Consider the primitive polynomial over GF(2). Construct GF(8) field using the given primitive polynomial. (ii) Find the minimal polynomial for the primitive element α. (iii) Find the BCH code of length n = 15, which can correct at least one error.
Solution
(i) GF(8) from
Let α be a root, so . The non-zero elements are the powers of α:
| Power | Polynomial | Vector |
|---|---|---|
| 0 | 0 | 000 |
| 1 | 100 | |
| α | 010 | |
| α² | 001 | |
| 1 + α | 110 | |
| α + α² | 011 | |
| 1 + α + α² | 111 | |
| 1 + α² | 101 | |
| 1 | 100 |
All 7 non-zero elements appear, so α is primitive. Addition is the vector XOR; multiplication adds exponents modulo 7.
(ii) Minimal polynomial of α
The conjugates of α are . Then
Now , and . So
(As expected: p(x) is itself the minimal polynomial of its root.)
(iii) BCH code of length 15 correcting one error
- For , work in GF(16), generated by a primitive polynomial of degree 4: .
- For , the generator is the minimal polynomial of β (a primitive element of GF(16)):
- Degree 4 gives . So this is the (15, 11) BCH code, which is the (15, 11) Hamming code, with and correcting 1 error.
- (For : , giving the (15, 7) code.)
✓ Checked by computer We built GF(8) and checked the minimal polynomial by direct computation.
The generator matrix of a (7, 4) linear block code is given by (1) Determine a parity check matrix H for this code. (2) Show that . (3) Determine all right code words of the dual code. (4) Find the minimum distance of the dual code.
Solution
(1) Parity-check matrix
with
(2)
Direct multiplication confirms that all 12 entries are 0.
(3) Codewords of the dual code (generated by H; a (7, 3) code)
| Message | Codeword | Weight |
|---|---|---|
| 000 | 0000000 | 0 |
| 001 | 0010111 | 4 |
| 010 | 0101110 | 4 |
| 011 | 0111001 | 4 |
| 100 | 1001011 | 4 |
| 101 | 1011100 | 4 |
| 110 | 1100101 | 4 |
| 111 | 1110010 | 4 |
(4) Minimum distance of the dual code
Every non-zero codeword has weight 4, so
(This is the (7, 3) simplex code, the dual of the (7, 4) Hamming code.)
✓ Checked by computer We formed H, checked GHᵀ = 0 and listed the dual code in Python.
The figure shows the encoder for a rate , constraint length K = 4 convolutional code. Determine the encoder output produced by the message sequence u = 1011.
Solution
Generators (from the figure)
(The upper adder sums the input and all three flip-flops; the lower sums the input, FF1 and FF3.)
Encoding u = 1011 (three zeros appended to clear the register)
| Input | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|
| Register (FF1 FF2 FF3) before | 000 | 100 | 010 | 101 | 110 | 011 | 001 |
| = sum of all four | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| = in + FF1 + FF3 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Output: 11 11 01 11 01 01 11
(Equivalently, and , interleaved.)
✓ Checked by computer We encoded the message in Python.
A convolutional encoder is shown below:
(i) Write down all the generator sequences and corresponding generator polynomial.
(ii) Determine the output sequence , if the input sequence is .
Solution
(i) Generator sequences and polynomials
From the figure:
- = input + stage 1 + stage 2:
- = input + stage 2:
This is the standard rate-1/2, code (7, 5 in octal), with .
(ii) Output for U = (1 0 0 1 1) (two flushing zeros added)
| Input | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
|---|---|---|---|---|---|---|---|
| 11 | 10 | 11 | 11 | 01 | 01 | 11 |
V = 11 10 11 11 01 01 11
Check:
Interleaving gives the sequence above ✓.
✓ Checked by computer We encoded the input in Python.
A convolutional code is described by the following generator sequences: (i) Construct the encoder circuit corresponding to this code. (ii) Draw the state diagram for this code. (iii) Draw the trellis diagram for a message sequence length of 5 bits. (iv) Determine the encoded sequence for the message sequence 10111.
Solution
(i) Encoder (, , ; , rate 1/3)
(ii) State diagram (state = last two inputs; label = input/output)
| Present state | Input 0: next / output | Input 1: next / output |
|---|---|---|
| 00 | 00 / 000 | 10 / 111 |
| 10 | 01 / 001 | 11 / 110 |
| 01 | 00 / 011 | 10 / 100 |
| 11 | 01 / 010 | 11 / 101 |
(iii) Trellis (5 message bits + 2 flushing zeros)
(iv) Encoded sequence for 10111
| Input | 1 | 0 | 1 | 1 | 1 | 0 | 0 |
|---|---|---|---|---|---|---|---|
| Output | 111 | 001 | 100 | 110 | 101 | 010 | 011 |
Codeword: 111 001 100 110 101 010 011 (the red path in the trellis). The code’s free distance is 6.
✓ Checked by computer We encoded the message and drew the state diagram and trellis in Python.
Discuss the concept of ‘Hamming distance’. How is the minimum Hamming distance between a set of code words related to the error detection and error correction properties of the code? Find the correct 4-bit messages from the following two Hamming codes, assuming at most a single error has occurred:
Solution
Hamming distance
The Hamming distance between two codewords is the number of positions in which they differ. The minimum distance of a code is the smallest distance between any two distinct codewords. For a linear code, this equals the smallest non-zero codeword weight.
Relation to error control
- Detection: up to errors can be detected if .
- Correction: up to errors can be corrected if .
- Both: correct and detect errors if .
Example: the (7, 4) Hamming code has , so it corrects 1 error or detects 2.
Decoding the two Hamming (7, 4) words
We use the standard arrangement: positions 1, 2, 4 are parity bits (), and positions 3, 5, 6, 7 are data. The syndrome (error position) is the XOR of the position numbers of all 1-bits.
C₁ = 0110101
- 1s at positions 2, 3, 5, 7.
- Syndrome : error in bit 3.
- Corrected word: 0100101.
- Data (positions 3, 5, 6, 7): 0101.
C₂ = 1011001
- 1s at positions 1, 3, 4, 7.
- Syndrome : error in bit 1 (a parity bit).
- Corrected word: 0011001.
- Data: 1001.
Answer: the messages are 0101 and 1001.
✓ Checked by computer We decoded both words by syndrome (bit positions 1–7) in Python.
Show that the (7, 4) cyclic codes generated by the two polynomials , and are equivalent. Find the codes for the four messages: (0011), (0101), (1010), (1101)
Solution
Equivalence of the two codes
So is the reciprocal of . Both divide :
so both generate (7, 4) cyclic codes.
If is a codeword of the code, then its reversal is a multiple of , i.e. a codeword of the code. So the codewords of one code are the bit-reversals of those of the other. The two codes have the same weight distribution and the same (= 3): they are equivalent (both are Hamming codes), differing only by a permutation (reversal) of positions.
Codes for the four messages (systematic form: message followed by parity, parity = remainder of )
| Message | Code with | Code with |
|---|---|---|
| 0011 | 0011 010 | 0011 101 |
| 0101 | 0101 110 | 0101 100 |
| 1010 | 1010 001 | 1010 011 |
| 1101 | 1101 000 | 1101 001 |
(Non-systematic encoding, , gives other codewords of the same codes. For example, with : 0011 → 0010111.)
✓ Checked by computer We encoded the four messages with both polynomials in Python.
Differentiate between the problems of error detection and correction. How many check/parity bits are required to correct a single error in a message of bits?
Solution
Error detection and error correction
- Error detection: the receiver only needs to know whether errors have occurred, from a check that fails (parity, checksum, CRC). The data are then retransmitted (ARQ). Little redundancy is needed. A few check bits detect many error patterns, including bursts.
- Error correction (FEC): the receiver must find which bits are wrong, and correct them without retransmission. This needs more redundancy: each correctable error pattern must produce a distinct syndrome. It is used where retransmission is impossible or too slow (one-way links, deep space, real-time media, storage).
In terms of distance: detecting errors needs ; correcting errors needs .
Check bits to correct a single error in m message bits
With check bits there are syndromes. They must distinguish “no error” plus an error in any one of the positions:
(Hamming condition)
| m | 1 | 4 | 11 | 26 | 57 |
|---|---|---|---|---|---|
| r | 2 | 3 | 4 | 5 | 6 |
For example, 4 data bits need 3 check bits, giving the (7, 4) Hamming code.
✓ Answer checked step by step Standard explanation.
Describe the Cyclic Redundancy Check (CRC) scheme for error detection. Explain how the Frame Check Sequence (FCS) and divisor/pattern are chosen. Given a message (10 bits), pattern (6 bits), illustrate how FCS can be calculated.
Solution
CRC scheme
- The k-bit message is treated as a polynomial.
- It is shifted left by bits (multiplied by ), where is the degree of the divisor (pattern) of bits.
- The result is divided modulo 2 by . The -bit remainder is the frame check sequence (FCS), and it is appended to the message.
- The transmitted frame is exactly divisible by .
- The receiver divides the received frame by . A non-zero remainder means an error.
Choice of the pattern (generator)
- Its first and last bits must be 1.
- It should have a factor , so that all odd numbers of errors are detected.
- A degree gives an n-bit FCS. It detects all bursts of length , and longer bursts with probability .
- It should not divide for small (so that double errors are detected).
- Standard patterns: CRC-12, CRC-16 (), CRC-CCITT (), CRC-32.
Example: = 1010001101 (10 bits), = 110101 (6 bits), so FCS has 5 bits.
Divide = 101000110100000 by 110101:
| Step | Segment | ⊕ 110101 → |
|---|---|---|
| 1 | 101000 | 011101 |
| 2 | 111011 | 001110 |
| 3 | 111010 | 001111 |
| 4 | 111110 | 001011 |
| 5 | 101100 | 011001 |
| 6 | 110010 | 000111 |
(Each segment is the next 6 bits starting at the leading 1, XOR-ed with 110101.)
Remainder (FCS) = 01110
Transmitted frame: 1010001101 01110. It is divisible by 110101, giving a zero remainder at the receiver.
✓ Checked by computer We carried out the division in Python.
The parity check matrix of a linear (7, 4) block code is given by Determine the coded word for the data 0101.
Solution
Note on the data. As printed, the last three columns of H are not the identity: the third row has an extra 1 in column 6. The code is still systematic, with data in positions 1–4, so we solve directly. The intended H, with last row 0111001, gives the same answer here.
Codeword with data 0101:
- Row 1: , so and .
- Row 2: , so and .
- Row 3: , so and .
Codeword: 0101100
(Check: ✓.)
✓ Checked by computer We solved cHᵀ = 0 for the parity bits in Python.
A systematic (7, 4) linear code has the parity matrix P given as:
(i) Find the code vectors for message vectors 1000, 0001, 0010 and 0111.
(ii) Draw the corresponding encoding diagram.
(iii) If the received vector [0111110] has a single error, detect the error and correct it.
Solution
Generator matrix
(i) Code vectors
| Message | Parity | Code vector |
|---|---|---|
| 1000 | 111 | 1000111 |
| 0001 | 011 | 0001011 |
| 0010 | 101 | 0010101 |
| 0111 | 110 ⊕ 101 ⊕ 011 = 000 | 0111000 |
(ii) Encoding diagram
The message bits go straight to the output (systematic). Three XOR gates form the parity bits:
(iii) Received 0111110
This equals the 2nd column of H: the error is in bit 2.
- Corrected vector: 0011110, i.e. message 0011.
- Check: ✓.
✓ Checked by computer We encoded the messages and corrected the received vector in Python.
Consider the convolutional encoder shown in the figure below. The code is systematic: (a) Draw the state diagram using the State Transition Table (b) Draw the Code Tree.
Solution
Encoder (from the figure)
- (the input itself: systematic);
- (the input plus the flip-flop output).
The state is the content of FF1, i.e. the previous input (, two states). The output for each bit is .
(a) State transition table and state diagram
| Present state () | Input | Output | Next state |
|---|---|---|---|
| 0 | 0 | 00 | 0 |
| 0 | 1 | 11 | 1 |
| 1 | 0 | 10 | 0 |
| 1 | 1 | 01 | 1 |
(b) Code tree
Upper branches are input 0 and lower branches input 1, labelled with the outputs. The tree repeats after each level according to the state (0 or 1).
Example: input 1011 gives 11 10 11 01.
✓ Answer checked step by step We tabulated the transitions and drew the diagrams in Python.
This question has the following parts.
(i) Explain ASK, FSK and PSK modulation schemes used for transmitting the data. Draw clearly the block diagram for coherent detection and non-coherent detection of FSK modulation scheme.
(ii) A (6, 3) systematic linear block code encodes the information sequence into code word such that is a parity check on and , to make the overall parity even, i.e., . Similarly is a parity check on and , and is a parity check on and . (1) Determine the generator matrix of this code. (2) Find the parity check matrix for this code. (3) Using the parity check matrix, determine the minimum distance of this code. (4) How many errors of this code are capable of correcting?
Solution
(i) ASK, FSK and PSK
- ASK: the carrier amplitude is switched between two levels (on–off for 1/0):
- FSK: the carrier frequency is switched between (for 1) and (for 0), at constant amplitude.
- PSK: the carrier phase is switched between 0 and π (BPSK), at constant amplitude and frequency.
Coherent and non-coherent FSK detection:
- Coherent: two correlators with synchronised local carriers at and , integrated over . The difference is compared with zero.
- Non-coherent: band-pass filters at and , followed by envelope detectors. The outputs are sampled and compared. No phase reference is needed.
(ii) The (6, 3) code
The parity equations are , , , with .
(1) Generator matrix ():
(2) Parity-check matrix:
(3) Minimum distance:
- The columns of H are all non-zero and distinct, so no single column or pair of columns sums to zero. Hence .
- Columns 1, 4 and 6 sum to zero: . Hence .
- Check: the codewords are 000000, 001011, 010110, 011101, 100101, 101110, 110011, 111000. The minimum non-zero weight is 3.
(4) Error correction:
The code corrects all single errors (and detects double errors).
✓ Checked by computer Same question as 6.2 (2012 Q3c); we built G and H and checked dmin in Python.
This question has the following parts.
(i) A convolutional encoder is given in the figure below: (1) Find the impulse response of the encoder. (2) Find the output code word if the input sequence is all 1’s (111111⋯).
(ii) Determine the channel capacity of band-limited waveform AWGN channel with an input power constraint.
Solution
(i) The encoder
From the figure: S1 holds the current input; upper output = S1 ⊕ S2, lower output = S1 ⊕ S3. So
(1) Impulse response (input 1 followed by 0s):
| Time | 0 | 1 | 2 |
|---|---|---|---|
| Output | 11 | 10 | 01 |
Impulse response: 11 10 01
(2) All-ones input (111…):
| Time | 0 | 1 | 2 | 3 | … |
|---|---|---|---|---|---|
| S1 S2 S3 | 100 | 110 | 111 | 111 | … |
| Output | 11 | 01 | 00 | 00 | … |
Output: 11 01 00 00 00 …
The infinite-weight input produces an output of finite weight 3. This shows the code is catastrophic: and share the factor . A few channel errors could then cause infinitely many decoding errors.
(ii) Capacity of the band-limited AWGN channel with power constraint
- Setting: the channel has bandwidth and additive white Gaussian noise of PSD . The input power is at most .
- Sampling: a band-limited signal is represented by samples per second (sampling theorem). Each sample is a use of a discrete-time Gaussian channel , with noise variance (noise power in band ) and .
- Capacity per sample: , where . is maximised when is Gaussian with variance , i.e. when is Gaussian with variance :
- Capacity per second ( samples/s):
This is the Shannon–Hartley theorem.
- As : , which gives the Shannon limit (−1.6 dB).
✓ Derivation checked step by step We computed the responses in Python and derived the capacity step by step.
This question has the following parts.
(i) Draw the neat sketch of OSI model. What is the significance of data link layer? Explain the flow-control and error-control mechanism.
(ii) Compute the CRC-4 character for the following message, using a modified divisor constant of 10011: 1100 0110 1011 01
Solution
(i) OSI model
| Layer | Name | Function |
|---|---|---|
| 7 | Application | User services: e-mail, file transfer, web |
| 6 | Presentation | Data representation, encryption, compression |
| 5 | Session | Dialogue control, synchronisation |
| 4 | Transport | End-to-end reliable delivery, segmentation, flow control (TCP) |
| 3 | Network | Routing and logical addressing (IP) |
| 2 | Data link | Framing, physical addressing, error and flow control on a link |
| 1 | Physical | Bits over the medium: voltages, timing, connectors |
Significance of the data link layer: it turns the raw, error-prone physical link into a reliable link between adjacent nodes. It:
- frames the bit stream, adding start and end delimiters and addresses;
- detects (and through retransmission corrects) errors, using a CRC/FCS in each frame;
- controls the flow so that a fast sender does not swamp a slow receiver;
- controls access to shared media (MAC sublayer).
Protocols: HDLC, PPP, Ethernet.
Flow control:
- Stop-and-wait: send one frame, then wait for its acknowledgement.
- Sliding window: up to W frames may be outstanding; the receiver advances the window with acknowledgements.
Error control (ARQ):
- Each frame carries a CRC. The receiver checks it and sends an ACK (correct) or NAK, or discards the frame.
- A timeout triggers retransmission.
- Stop-and-wait ARQ, go-back-N ARQ (resend from the errored frame) and selective-repeat ARQ (resend only the bad frame).
(ii) CRC-4 for 1100 0110 1011 01 with divisor 10011
Append 4 zeros and divide modulo 2 by 10011:
| Step | Segment | ⊕ 10011 → |
|---|---|---|
| 1 | 11000 | 01011 |
| 2 | 10111 | 00100 |
| 3 | 10010 | 00001 |
| 4 | 11011 | 01000 |
| 5 | 10000 | 00011 |
| 6 | 11100 | 01111 |
| 7 | 11110 | 01101 |
| 8 | 11010 | 01001 |
CRC-4 = 1001
Transmitted: 11000110101101 1001
✓ Answer checked step by step We computed the CRC-4 in Python.
This question has the following parts.
(i) How is error detection handled in data transfer, using checksums and cyclic redundancy characters (CRC)? Explain the concepts.
(ii) Suppose the following data bytes are received and the last byte is the checksum character: 10, 23, 45, 04, 84 Has the data been received correctly?
(iii) Calculate the data polynomial for the 16-bit data stream 26F0 H. Write the generator polynomial for bisync and SDLC protocols.
Solution
(i) Error detection with checksums and CRC
- Checksum: the sender adds the data bytes (or 16-bit words) arithmetically, modulo 256 or modulo (one’s- or two’s-complement). It sends the complement of the sum as the checksum. The receiver adds all bytes including the checksum. The result must be zero (or all 1s); otherwise there is an error.
- Simple and fast in software (used in IP, TCP, UDP).
- Misses some errors, e.g. reordering of bytes, or compensating errors in two bytes.
- Cyclic redundancy check (CRC): the message is treated as a polynomial and divided (modulo 2) by a generator of degree . The -bit remainder is appended. The receiver divides the frame by : a non-zero remainder means an error.
- It detects all single and double errors, all odd numbers of errors if divides , and all bursts of length , plus most longer bursts.
- Easily implemented with shift registers. Used in HDLC, Ethernet and storage.
(ii) Checking the received bytes
The bytes are taken as hexadecimal. The checksum is the two’s complement of the sum of the data bytes, so the total, including the checksum, must be 00 (mod 256):
The sum is zero, so the data have been received correctly. (The two’s complement of is ✓.)
(iii) Data polynomial for 26F0H
Generator polynomials:
- Bisync (BSC, CRC-16):
- SDLC (CRC-CCITT):
✓ Answer checked step by step We checked the checksum and wrote the polynomial.
This question has the following parts.
(i) Distinguish among the following terms: (1) Forward error correction and Error detection method (2) Random error and Burst error (3) Block codes and Convolutional codes
(ii) If is a valid code vector , then prove that , where is the transpose of the parity check matrix .
(iii) List the merits and demerits of delta modulation.
Solution
(i) Distinctions
(1) FEC and error detection
- Forward error correction: enough redundancy is added that the receiver can locate and correct errors itself, with no return channel. It needs more redundancy and decoding effort. Used for one-way and real-time links.
- Error detection (with ARQ): less redundancy, used only to detect errors. Correction is by retransmission over a feedback channel. Throughput falls when the error rate is high.
(2) Random and burst errors
- Random errors: independent single-bit errors, scattered at random (e.g. thermal noise on AWGN channels).
- Burst errors: many errors clustered in a short interval (a burst of length b, from the first to the last error), caused by impulse noise, fading or scratches on media.
- Random-error codes: Hamming, BCH. Burst codes: Fire codes, Reed–Solomon, interleaving.
(3) Block and convolutional codes
- Block codes: each block of k message bits is encoded independently into an n-bit codeword, with no memory: (n, k) Hamming, cyclic, BCH and RS codes.
- Convolutional codes: the encoder has memory (a shift register). Each output depends on the current and the previous inputs. A continuous stream is encoded at rate , and decoded by the Viterbi algorithm.
(ii) If , then
In systematic form, and . Then
since in GF(2). For any codeword :
Every valid code vector therefore satisfies . Conversely, a received vector with a non-zero syndrome cannot be a codeword, so an error is indicated. ∎
(iii) Delta modulation: merits and demerits
Merits:
- one bit per sample, so a very simple encoder and decoder (comparator and integrator);
- no framing is needed;
- robust to bit errors;
- the bit rate can be adjusted.
Demerits:
- slope-overload distortion and granular noise;
- needs a high sampling (bit) rate, so a large bandwidth for good quality;
- limited dynamic range unless adaptive (ADM, CVSD).
✓ Proof checked step by step We proved CHᵀ = 0 step by step.
Two important types of error-correcting codes are: (i) block codes and (ii) convolutional codes. Write the main difference between the block codes and convolutional codes. Explain the codes, which are a subclass of linear block codes.
Solution
Block codes and convolutional codes
| Block codes | Convolutional codes |
|---|---|
| The message is divided into blocks of k bits; each block is encoded independently into an n-bit codeword | The encoder has memory: each group of n output bits depends on the current k input bits and on the previous inputs (constraint length ) |
| Described by (n, k), the generator matrix G and the parity-check matrix H | Described by generator sequences or polynomials, and state, tree and trellis diagrams |
| Decoded block by block: syndrome decoding, algebraic decoding (BCH, RS) | Decoded by sequential decoding or the Viterbi algorithm (maximum likelihood over the trellis) |
| Performance set by | Performance set by |
| Suited to bursty channels (RS), storage, error detection (CRC) | Suited to random-error channels with soft decisions (satellite, mobile); good coding gain with simple encoders |
Subclasses of linear block codes
- Repetition codes: each bit repeated n times; (n, 1); .
- Single parity-check codes: (k+1, k); detect any odd number of errors; .
- Hamming codes: , , ; single-error-correcting; perfect codes. The columns of H are all the non-zero m-tuples.
- Cyclic codes: every cyclic shift of a codeword is a codeword. Generated by a polynomial dividing , with easy shift-register encoding and decoding. CRC codes are cyclic codes used for detection.
- BCH codes: cyclic codes designed for a chosen number of correctable random errors (with , ), using roots in GF().
- Reed–Solomon codes: non-binary BCH codes over GF(); MDS (); excellent for burst errors (CDs, DVDs, deep space, digital TV).
- Golay code: (23, 12), , perfect.
- Reed–Muller codes, LDPC codes (sparse H; near-capacity performance) and product codes.
✓ Answer checked step by step Standard explanation.
(i) A (6, 3) linear block code have the following parity-check matrix H: Determine: (i) generator matrix G and (ii) code word for the data bit 101. (ii) Give a basic sketch illustrating a convolutional encoder with k = 3, k = 1 and n = 2. What are its advantages and disadvantages over block codes?
Solution
(i) Generator matrix and codeword
H is in the form :
Codeword for data 101:
Check: ✓. The code has .
(ii) Convolutional encoder with K = 3, k = 1, n = 2
- One input bit enters a 2-stage shift register.
- Two modulo-2 adders, with generators and , form two outputs per input bit (rate 1/2), sent in turn by a commutator.
- The encoder has 4 states; .
Advantages over block codes:
- good coding gain with simple encoders;
- easy use of soft-decision decoding (Viterbi), which gives about 2 dB more gain;
- continuous operation, with no block framing;
- well suited to random-error channels (satellite, mobile).
Disadvantages:
- the decoder (Viterbi) complexity grows exponentially with K;
- errors at the decoder output come in bursts;
- poor against long burst errors unless interleaved;
- less suited to error detection (CRC) and storage, and lacks the algebraic structure of block codes.
✓ Checked by computer We derived G and encoded the data in Python.
‘Huffman coding is done to increase the rate of information bits to make them approach the rate of binary digits while in parity-check coding rate of binary digits is increased to make the information transmission more reliable’ Comment.
Solution
The statement is correct.
Comment
- Huffman (source) coding removes redundancy from the source output. Frequent symbols get short codewords and rare symbols long ones, so the average number of binary digits per symbol, , approaches the entropy (information bits per symbol).
- The information rate per binary digit, (the efficiency), approaches 1: each binary digit carries nearly one bit of information.
- In the words of the statement, the rate of information bits is made to approach the rate of binary digits.
- Example: 2.93 digits for an entropy of 2.90 bits gives 99% efficiency.
- Parity-check (channel) coding does the opposite. It adds controlled redundancy (check digits), so that binary digits are sent for every information digits.
- The rate of binary digits rises relative to the information rate (code rate ).
- The redundancy lets the receiver detect and correct errors, making transmission more reliable.
- So the two are complementary:
- source coding makes the representation efficient;
- channel coding makes the transmission reliable.
✓ Answer checked step by step Standard reasoning.
Discuss three kinds of error-detection codes and explain how they detect errors.
Solution
Three kinds of error-detection codes
1. Parity check (vertical redundancy check, VRC)
- A parity bit is added to each character or word so that the total number of 1s is even (or odd).
- The receiver counts the 1s. A wrong parity means an error.
- It detects all odd numbers of errors in the word, but misses even numbers of errors.
- Longitudinal / block parity (LRC): parity across the same bit positions of a block of characters (a parity row). Combined with VRC, it can detect most errors and locate (correct) single errors.
2. Checksum
- The data words are added (modulo , or one’s-complement arithmetic). The complement of the sum is sent as the checksum.
- The receiver adds all words plus the checksum. A non-zero (or not all-1s) result means an error.
- Simple in software (Internet protocols, IP and TCP). It detects most errors, but misses errors that cancel in the sum, and the reordering of words.
3. Cyclic redundancy check (CRC)
- The message polynomial , shifted by bits, is divided by a generator of degree . The remainder (FCS) is appended.
- The receiver divides the received frame by . A non-zero remainder indicates an error.
- It detects:
- all single errors;
- all double errors (for suitable );
- all odd numbers of errors, if divides ;
- all bursts of length ;
- most longer bursts, with probability .
- Easily implemented with shift registers and XOR gates. Used in HDLC, Ethernet (CRC-32), USB and storage.
(Other detecting codes include constant-ratio codes, such as 2-out-of-5, and Hamming codes used in detection mode.)
✓ Answer checked step by step Standard description.
More on Digital Communication
- All Electrical Engineering PYQ solutions, topic by topic
- Digital Communication topic-wise PYQs (questions only, for practice)
- Electrical Engineering PYQ analysis: which units carry the marks year by year
- Year-wise question papers
- Electrical Engineering booklist
Questions: UPSC Civil Services (Main) Examination, Electrical Engineering Paper II, 2000–2026. Solutions: Optional Province. Found an error? Tell us.

