The GATE Grind

GATE 2018 EC – Question 26

Communications · Information Theory · 1 mark · Numerical answer

Consider a binary channel code in which each codeword has a fixed length of 5 bits. The Hamming distance between any pair of distinct codewords in this code is at least 2. The maximum number of codewords such a code can contain is ________.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 16

Explanation

A code with minimum distance 2 can detect any single error. A simple way to build one is to send 4 data bits plus 1 even-parity bit: any two codewords then differ in at least 2 positions.

This gives $2^4=16$ codewords. It cannot be beaten: if there were 17 codewords of length 5, two of them would agree in the first 4 bits (only 16 prefixes exist), so they would differ in at most 1 position, violating $d\ge2$. The maximum is 16.

More Information Theory questions

All Information Theory questions →