CS FundamentalsVery hardProduct company interview · GATE level
A 12-bit Hamming codeword protects 8 data bits. Positions are numbered 1 to 12 from the left, even-parity check bits sit at positions 1, 2, 4 and 8 (the check bit at position p covers every position whose binary number has bit p set), and data bits fill positions 3, 5, 6, 7, 9, 10, 11, 12 in order. The word 001001110000 is received with at most one bit in error. Which position is in error, and what 8 data bits were sent?
- A. Position 10; data 10110100
- B. No data bit is wrong; data 10110000
- C. Position 5; data 11110000
- D. Position 12; data 10110001
Correct answer: A. Position 10; data 10110100
Recompute the four parity checks on 001001110000: check 1 (positions 1,3,5,7,9,11) is even, check 2 (2,3,6,7,10,11) is odd, check 4 (4,5,6,7,12) is even, check 8 (8,9,10,11,12) is odd. The failing checks sum to 2 + 8 = 10, so position 10 is wrong. Flipping it gives 001001110100, whose data bits (positions 3,5,6,7,9,10,11,12) are 10110100. Reading the syndrome bits in reverse order points to position 5, which is the trap; leaving the word uncorrected gives 10110000.
More Computer Networks questions
- A 100 Mbps CSMA/CD network has its two farthest stations 500 m of cable apart, with two repeaters on the path between them. Signals travel…
- Two Ethernet stations A and B collide. For A this is the 1st collision of its current frame, so it picks its backoff K uniformly from {0…
- Routers A, B and C run a basic distance-vector protocol with no split horizon or poisoned reverse. Link costs are A-B = 3, B-C = 2 and A-C…
- Five routers use distance-vector routing with link costs A-B = 1, B-C = 2, C-D = 1, D-E = 3, A-E = 12, A-D = 7 and B-D = 5. Initially each…
- Dijkstra's algorithm is run from S on an undirected network with link costs S-A 7, S-B 2, S-C 6, A-B 3, B-D 8, A-D 4, B-C 5, C-E 5, D-E 1…
- The block 10.20.64.0/20 is allocated with VLSM, always taking the lowest free addresses and handling requests in this order: LANs needing…