FEC bit error detection/correction question

Thread Starter

HCN1996

Joined Nov 29, 2015
25
Hello, im just wondering if I am doing the following problem correctly. "Create a data sequence of the concatenated 7-bit ASCII encodings of the 7 characters given to you. Compute and place the appropriate FEC bits for error detection/correction for your data sequence.Thanks for the help.
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
24,581
How can we possibly tell you if you are doing it correctly when you give no hint as to what type of FEC coding you are using.

But if you are concatenating 7-bit ASCII codes for the seven characters, why are you only using the ASCII codes for the first three?
 

Thread Starter

HCN1996

Joined Nov 29, 2015
25
How can we possibly tell you if you are doing it correctly when you give no hint as to what type of FEC coding you are using.

But if you are concatenating 7-bit ASCII codes for the seven characters, why are you only using the ASCII codes for the first three?
I will just ask my professor. We havent been taught in depth about any of this yet. I thought I was using the ASCII codes for the last 4 digits? 2 being 0000010, 4 being 0000100, 7 being 0000111.
 

Papabravo

Joined Feb 24, 2006
12,301
I will just ask my professor. We havent been taught in depth about any of this yet.
That's fine, but can you at least explain what you think you should be doing? For example can you tell us how many check bits you will need for a message of 49 bits (7 characters of 7 bits), so we can tell if you are on the right track?
 

Thread Starter

HCN1996

Joined Nov 29, 2015
25
That's fine, but can you at least explain what you think you should be doing? For example can you tell us how many check bits you will need for a message of 49 bits (7 characters of 7 bits), so we can tell if you are on the right track?
I honestly cant even follow your question because of my lack of knowledge about the subject. I will try to explain my thought process and see what you can make of it. First, I took the 7 characters given to me (hcn2472) and used an ASCII table to find the hex equivalent of the characters. I then converted from hex to BCD. After that I mapped out 64 bits(placeholders) because that is how many I would need to fit 49 and put an X over the 7 FEC bits (powers of 2). I took all of the BCD numbers and mapped them into the remaining spots. I then XOR'd the BCD equivalents of the place values that had a 1 in them. That gave me 1111111 which I substituted in to the FEC bits and added those place values (1,2,4,8,16,32,64) BCD equivalents to the others and after XORing the new list I got 0110000. I then added BCD equivalent of 30 to the final xor list and changed its value from 0 to 1 because our professor has led me to believe that this is my error. After XORing this list I got 0000000. I think this means that I have no errors. Sorry if this paragraph makes no sense. Thats the best I can describe my thought process with my little knowledge of the subject.
 

Papabravo

Joined Feb 24, 2006
12,301
I could almost follow that description, but you lost me in the description of what you did. We agree that the message contains 49 information bits of 7 characters of 7 bits each. There is no earthly reason I can think of to convert the binary values of the characters in the message to BCD. That actually requires more bits to represent a seven bit quantity. If the number is greater than 100, then it takes a total of 12 bits to represent that number in BCD. I'll grant you that you need only 1 bit for the most significant BCD digit, so technically 9 bits would suffice to represent a seven bit binary (hex) number. It is also important that you revealed that there are 7 check bits. Thus the total meaasge is 56 bits long. Now each of the check bits is a function of the bits in particular positions and we need to know the computation for each of the check bits, both in terms of computing them and checking them. For example:

Let's say you number the bits in the message from left to right starting at 1 an ending at 49. The first check bit will be at position 50 and the remainder will follow.

Let MB1 be message bit 1, and let CB1 be Check Bit 1, and let ⊕ stand for the associative XOR operation, then

CB1 = ((((((MB1 ⊕ MB8) ⊕ MB15) ⊕ MB22) ⊕ MB29) ⊕ MB36) ⊕ MB43)
...
and so on.

I'm not saying the above is the answer you seek, but I am suggesting an alternate method of describing the operations.
 

Thread Starter

HCN1996

Joined Nov 29, 2015
25
I could almost follow that description, but you lost me in the description of what you did. We agree that the message contains 49 information bits of 7 characters of 7 bits each. There is no earthly reason I can think of to convert the binary values of the characters in the message to BCD. That actually requires more bits to represent a seven bit quantity. If the number is greater than 100, then it takes a total of 12 bits to represent that number in BCD. I'll grant you that you need only 1 bit for the most significant BCD digit, so technically 9 bits would suffice to represent a seven bit binary (hex) number. It is also important that you revealed that there are 7 check bits. Thus the total meaasge is 56 bits long. Now each of the check bits is a function of the bits in particular positions and we need to know the computation for each of the check bits, both in terms of computing them and checking them. For example:

Let's say you number the bits in the message from left to right starting at 1 an ending at 49. The first check bit will be at position 50 and the remainder will follow.

Let MB1 be message bit 1, and let CB1 be Check Bit 1, and let ⊕ stand for the associative XOR operation, then

CB1 = ((((((MB1 ⊕ MB8) ⊕ MB15) ⊕ MB22) ⊕ MB29) ⊕ MB36) ⊕ MB43)
...
and so on.

I'm not saying the above is the answer you seek, but I am suggesting an alternate method of describing the operations.
Thank you for your help, I will reference back to this post to help me as I learn more.
 

WBahn

Joined Mar 31, 2012
24,581
I will just ask my professor. We havent been taught in depth about any of this yet. I thought I was using the ASCII codes for the last 4 digits? 2 being 0000010, 4 being 0000100, 7 being 0000111.
Look at an ASCII table.

Remember, ASCII is a way of encoding characters. The code 65 tells the display device to output a pattern of dots (or whatever technology it uses) that looks to a human to be the character 'A'. What you want for the character '2' is the code that tells the display to output a pattern of dots that looks to a human to be the character '2'. That code happens to be 50.
 

WBahn

Joined Mar 31, 2012
24,581
I honestly cant even follow your question because of my lack of knowledge about the subject. I will try to explain my thought process and see what you can make of it. First, I took the 7 characters given to me (hcn2472) and used an ASCII table to find the hex equivalent of the characters. I then converted from hex to BCD. After that I mapped out 64 bits(placeholders) because that is how many I would need to fit 49 and put an X over the 7 FEC bits (powers of 2). I took all of the BCD numbers and mapped them into the remaining spots. I then XOR'd the BCD equivalents of the place values that had a 1 in them. That gave me 1111111 which I substituted in to the FEC bits and added those place values (1,2,4,8,16,32,64) BCD equivalents to the others and after XORing the new list I got 0110000. I then added BCD equivalent of 30 to the final xor list and changed its value from 0 to 1 because our professor has led me to believe that this is my error. After XORing this list I got 0000000. I think this means that I have no errors. Sorry if this paragraph makes no sense. Thats the best I can describe my thought process with my little knowledge of the subject.
I have no idea what BCD has to do with anything, but from the remark about the FEC bits being powers of 2, it makes it sound like you are doing Hamming FEC. There's more than one "Hamming FEC code", but one is far more dominant than the others.

I'm going from memory here, so I could well be misremembering.

Consider that you have 8 bits of data. You number the bit positions start with one (NOT zero!).

0001 - CHECK BIT
0010 - CHECK BIT
0011
0100 - CHECK BIT
0101
0110
0111
1000 - CHECK BIT
1001
1010
1011
1100

Check bits are those positions that have exactly one 1 in their index value (powers of 2).

The data is assigned to the non-checkbit locations.

Each check bit is the XOR of all the data bits located in positions that have a 1 in the same position in the index number that the check bit does.

The parity of each bit is either odd or even depending on the protocol -- I don't recall what the more common polarity it.

Can you reason out why we start the position numbering with 1 and not 0?
 
Top