1

Can someone please clarify where im going wrong. I'm at this 2 hours... I know that the first parity in the code includes itself and skips every first number after it in a yes and no sequence. the second skips every second set of numbers after itself and the following number. The 4th should skip 4 after including itself and the first 3 numbers.

These are my message bits in its original form: 1101011011000110 
   and I want to add the hamming parity bits onto them.
   ? = Parity
so this means ??1?101?01101100011?0 
Parity 1 = ?110110010 
Parity 2 = ?101111011 
Parity 3 = ?1010110?0 (this is where my issue is so I cant move on)
Parity 4 = cant get to this part...
Ravnica
  • 25
  • 4

1 Answers1

0

It looks like you have the 5th parity bit in the wrong location.

You have:

??1?101?01101100011?0

But it should be:

??1?101?0110110?00110

So, recalculating the parity bits (bold means "keep", otherwise skip), we follow the pattern "keep 1, skip 1, keep 1...":

? ? 1 ? 1 0 1 ? 0 1 1 0 1 1 0 ? 0 0 1 1 0

P1: ?1110110010 (even number of 1s, so 0 parity)

(discard first 1 bit) Follow the pattern "keep 2, skip 2, keep 2...":

?1 ?1 01 ?0 11 01 10 ?0 01 10

P2: ?101111001 (even number of 1s, so 0 parity)

(discard next 2 bits) Follow the pattern "keep 4, skip 4, keep 4...":

?101 ?011 0110 ?0011 0

P4: ?10101100 (even number of 1s, so 0 parity)

(discard next 4 bits) Follow the pattern "keep 8, skip 8, keep 8..." (but we can only do keep 8, skip 6, so that's good enough here):

?0110110 ?00110

P5: ?0110110 (even number of 1s, so 0 parity)

So the final, hamming (21,16) encoded value is:

001010100110110000110

(21 bits, 16 of which are data bits)

Duane J
  • 1,615
  • 1
  • 15
  • 22