The representation of 4 bit code 1101 into 7 bit, even parity Hamming code is

2022

The representation of 4 bit code 1101 into 7 bit, even parity Hamming code is

  1. A.

    (1010101)

  2. B.

    (1111001)

  3. C.

    (1011101)

  4. D.

    (1110000)

Attempted by 287 students.

Show answer & explanation

Correct answer: A

Solution:

  1. Place the 4 data bits of the original code 1101 into positions 3, 5, 6, and 7 of the 7-bit Hamming code (positions 1, 2, and 4 are parity bits).

  2. Mapping (positions 1 to 7): p1, p2, d1, p4, d2, d3, d4. With data bits d1=1, d2=1, d3=0, d4=1, the pattern becomes: _ _ 1 _ 1 0 1.

  3. Compute parity bits for even parity:

    p1 covers positions 1, 3, 5, 7. Bits at 3,5,7 are 1,1,1 (three ones), so p1 must be 1 to make the total even.

    p2 covers positions 2, 3, 6, 7. Bits at 3,6,7 are 1,0,1 (two ones), so p2 must be 0 to keep even parity.

    p4 covers positions 4, 5, 6, 7. Bits at 5,6,7 are 1,0,1 (two ones), so p4 must be 0 to keep even parity.

  4. Final 7-bit code: p1 p2 d1 p4 d2 d3 d4 = 1 0 1 0 1 0 1

Therefore the correct 7-bit even-parity Hamming code for 1101 is (1010101).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Tpsc Assistant Technical Officer