You are on page 1of 3

Question:

Suppose we are working with an error-correcting code that will


allow all single-bit errors to be corrected for memory words of
length 7. We have already calculated that we need 4 check bits, and
the length of all code words will be 11. Code words are created
according to the Hamming algorithm presented in the text. We now
receive the following code word:

10101011110

Assuming even parity, is this a legal code word? If not, according to


our error-correcting code, where is the error?

Answer :

An error-correcting code that will allow all single-bit errors to be


corrected for memory words of length 7. It is given that we need 4
check bits and the length of all code words will be 11. According to
hamming algorithm the code word which we receive is
.

Number bits “n†will start from right to left and start with 1.
The bit, whose number is a power of 2, is a parity bit and rest of the
bits will be data bits. The parity bit will be denoted as a box. ,
, and . So the parity bit numbers will be 1, 2, 4
and 8.

Parity bits will be assigned to check the bit positions. For this first write the all bit
positions so that sum of those numbers that are power of 2.
This study source was downloaded by 100000811099098 from CourseHero.com on 12-21-2021 10:50:42 GMT -06:00

https://www.coursehero.com/file/64472987/Exam-366pdf/
Now, it is given that the code word is . So fill all the data bits and

parity bits.

Parity bit 1 checks 1, 3,5,7,9 and 11. So we will first write the bit position of those
bits and do the modulo 2 sum.

The modulo 2 addition rules:

After doing the modulo 2 addition the sum will be 1. But it is given that at parity bit
1 the value is 0. Hence, there is an error.

Parity bit 2 checks 2, 3, 6,7,10 and 11. So we will first write the bit position of those
bits and do the modulo 2 sum.

After doing the modulo 2 addition the sum will be 1. So bit 2 must be 1.

This study source was downloaded by 100000811099098 from CourseHero.com on 12-21-2021 10:50:42 GMT -06:00

https://www.coursehero.com/file/64472987/Exam-366pdf/
Parity bit 4 checks 4, 5, 6 and 7. So we will first write the bit position of those bits
and do the modulo 2 sum.

After doing the modulo 2 addition the sum will be 0. But it is given that at parity bit
4 the value is 0. Hence, there is an error.

Parity bit 8 checks 8, 9, 10 and 11. So we will first write the bit position of those
bits and do the modulo 2 sum.

After doing the modulo 2 addition the sum will be 0. So bit 8 must be 0.

Since errors occur in bit positions 1 and 4. So the error will be in bit number
. Hence, this is not a legal code word.

This study source was downloaded by 100000811099098 from CourseHero.com on 12-21-2021 10:50:42 GMT -06:00

https://www.coursehero.com/file/64472987/Exam-366pdf/
Powered by TCPDF (www.tcpdf.org)

You might also like