0% found this document useful (0 votes)
95 views3 pages

HW Sol

The document summarizes how to encode an 8-bit binary value 10101111 using even-parity Hamming code. After inserting check bits at positions that are powers of 2, the encoded binary value is 10100100110111. The document also explains how cyclic redundancy check (CRC) detects an error when a bit is inverted during transmission of the bit stream 10011101 with generator polynomial x3 + 1. The actual frame transmitted is 10011101100, and receiving 10111101100 instead produces a non-zero remainder indicating an error occurred.

Uploaded by

wiyeto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views3 pages

HW Sol

The document summarizes how to encode an 8-bit binary value 10101111 using even-parity Hamming code. After inserting check bits at positions that are powers of 2, the encoded binary value is 10100100110111. The document also explains how cyclic redundancy check (CRC) detects an error when a bit is inverted during transmission of the bit stream 10011101 with generator polynomial x3 + 1. The actual frame transmitted is 10011101100, and receiving 10111101100 instead produces a non-zero remainder indicating an error occurred.

Uploaded by

wiyeto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Question 1

An 8-bit byte with binary value 10101111 is to be encoded using an even-parity


Hamming code. What is the binary value after encoding?

Answer
Check bits are inserted at positions that are powers of 2 i.e. 1,2,4,8,16,32,e.t.c. Data bits
are at positions 3,5,6,7,9,10,11,12 e.t.c. So after inserting check bits our data should
look like this:

? ? 1 ? 0 1 0 ? 1 1 1 1
positions 1 2 3 4 5 6 7 8 9 10 11 12

3 = 1+2
5 = 1+4
6 = 2+4
7 = 1+2+4
9 = 1+8
10 = 2+8
11 = 1+2+8
12 = 4+8

Hence for the check bit 1 we look at bits 3,5,7,9,11 and get value 1.
For check bit 2 we look at bits 3,6,7,10,11 and get value 0.
For check bit at position 4 we look at bits 5,6,7,12 and get value 0.
For check bit at position 8 we look at bits 9,10,11,12 and get value 0.

Hence the binary value after encoding is 1 0 1 0 0 1 0 0 1 1 1 1.


Question 2 (Chapter 3: 15)
A bit stream 10011101 is transmitted using the standard CRC method. The generator
polynomial is x3 + 1. Show the actual bit string transmitted. Suppose the third bit from
the left is inverted during transmission. Show that this error is detected at the receivers
end.

Answer
Our generator G(x) = x3 + 1 encoded as 1001. Because the generator polynomial is of the
degree three we append three zeros to the lower end of the frame to be transmitted.
Hence after appending the 3 zeros the bit stream is 10011101000. On dividing the
message by generator after appending three zeros to the frame we get a remainder of 100.
We do modulo 2 subtraction thereafter of the remainder from the bit stream with the three
zeros appended. The actual frame transmitted is 10011101100. See below.

1 0 0 0 1 1 0 0

1001 1 0 0 1 1 1 0 1 0 0 0
1 0 0 1

0 0 0 1
0 0 0 0

0 0 1 1
0 0 0 0

0 1 1 0
0 0 0 0

1 1 0 1
1 0 0 1

1 0 0 0
1 0 0 1

0 0 1 0
0 0 0 0

0 1 0 0
0 0 0 0

1 0 0 (remainder)

Actual frame transmitted : 10011101000 – 100 = 10011101100 (modulo 2 subtraction)


Now suppose the third bit from the left is garbled and the frame is received as
10111101100. Hence on dividing this by the polynomial generator we get a remainder of
100 which shows that an error has occurred. Had the received frame been error free we
would have got a remainder of zero. See below.

1 0 1 0 1 0 0 0

1001 1 0 1 1 1 1 0 1 0 0 0
1 0 0 1

0 1 0 1
0 0 0 0

1 0 1 1
1 0 0 1

0 1 0 0
0 0 0 0

1 0 0 1
1 0 0 1

0 0 0 1
0 0 0 0

0 0 1 0
0 0 0 0

0 1 0 0
0 0 0 0

1 0 0 (remainder indicating error)

You might also like