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

Laboratory 5 - Dave Malinab

The document describes analyzing an error-correcting code word using the Hamming algorithm. It is determined that: 1) The code word length is 11 bits with 7 data bits and 4 check bits. 2) Calculating the parity bits reveals errors in the 1st and 4th bit positions. 3) Therefore, the received code word is not legal and the error exists in the 5th bit position.

Uploaded by

Jessica Kling
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)
30 views3 pages

Laboratory 5 - Dave Malinab

The document describes analyzing an error-correcting code word using the Hamming algorithm. It is determined that: 1) The code word length is 11 bits with 7 data bits and 4 check bits. 2) Calculating the parity bits reveals errors in the 1st and 4th bit positions. 3) Therefore, the received code word is not legal and the error exists in the 5th bit position.

Uploaded by

Jessica Kling
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

DAVE MALINAB BSIT 2B

MR. AR-JAY SACAY ITPE 121 – PLATFORM TECHNOLOGIES

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?

Step-by-step solution:
______________________________________________________________________

Step 1:

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 1 0 1 0 1
0 1 1 1 1 0. 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 20 = 1, 21= 2, 22= 4, and 23= 8. So the parity bit numbers will
be 1, 2, 4 and 8

______________________________________________________________________

Step 2:

___ ___ ___ ___ ___ ___ ___ ___ ___ ____

11, 10, 9, 8, 7, 6, 4, 3, 2, 1

______________________________________________________________________

Step 3:

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.

______________________________________________________________________
Step 4:

______________________________________________________________________

Step 5:

Now, it is given that the code word is 1 0 1 0 1 0 1 1 1 1 0. So fill all the data bits and
parity bits.

______________________________________________________________________

Step 6:

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 sums.

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 sums.

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

______________________________________________________________________

Step 7:

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.

567

1+0+1 → Data bits

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.

9 10 11

1 + 0 + 1 → Data bits

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 1 + 4 = 5.

Hence, this is not a legal code word

You might also like