Friday 4 November 2011

Construct the Hamming code for the bit sequence 10011101

Solution
First we find redundant bits (r) such that 2r >= r+m+1
so here r = 4

so there are 4 redundant bits;
r1,r2,r4,r8        

so bits after insertion redundant bits.....
1  0  0  1  r8  1  1  0 r4  1 r2  r1
^                 .....................           ^
12th bit                                    1st bit   (r1)
r1 is calculated from even parity of bits number ( 1,3,5,7,9,11)
r2 is calculated from even parity of bits  (2,3,6,7,10,11)
r4 is calculated from even parity of bits (4,5,6,7,12)
r8 is calculated from even parity of bits (8,9,10,11,12)

calculation of r1
as bit no. 3 = 1
    bit no. 5 = 0
    bit no. 7 = 1
    bit no. 9 = 1
    bit no. 11=0
to make no. of 1's even we have r1 = 1

 
count no of 1's for which r2 take cares of bit
(2,3,6,7,10,11)
no of 1's are found to be = 3 (on bit 3,6,7)

its clearly odd (for even parity we have to make no of 1's = even , if already no of one is even then simply r = 0)

so what we do we will make r2 = 1 to make no of 1's = even

similarly ,
r2 =1

r4=1

r8=0

Hence Following are the redundancy bits.

r1 = 1
r2 = 1
r4 = 1
r8 = 0

So the Hamming code is 100101101111

No comments:

Post a Comment