Question
Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is , where the data bits and the check bits are given in the following tables:
| d8 | d7 | d6 | d5 | d4 | d3 | d2 | d1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | x | 0 | 1 | 0 | 1 |
| c8 | c4 | c2 | c1 |
|---|---|---|---|
| y | 0 | 1 | 0 |
Which one of the following choices gives the correct values of and ?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2021 answer key
Solution
Set up parity check equations using 1-based bit indexing for standard Hamming code positions.
The 12-bit Hamming codeword structure places check bits at powers of 2 (positions 1, 2, 4, 8) and data bits at all other positions:
- Position 1:
- Position 2:
- Position 3:
- Position 4:
- Position 5:
- Position 6:
- Position 7:
- Position 8:
- Position 9:
- Position 10:
- Position 11:
- Position 12:
We are given the values:
Parity bit covers all positions whose binary representation has bit 0 set (1, 3, 5, 7, 9, 11):
Substituting known values:
Parity bit covers positions whose binary representation has bit 3 set (8, 9, 10, 11, 12):
With , :
Thus, and , which matches option A.
A
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology (CS, Set-1)
- Question
- 39 of 65, printed as CS Q.29
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.