Parity Check Question -- University Level Intro Course: Networking

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
SumDood_
Messages
39
Reaction score
6
Homework Statement
The size of the dataword is 5 bits. The codewords are created to match all dataword possibilities.
a) Create a table with all the datawords and codewords using parity-check code.
Relevant Equations
n = k + r
n -> codeword
k-> dataword
r-> redundant bits
What I know:
Parity check is used to detect if there are errors when transmitting data by adding redundancy bits to the dataword (data that we want to send) which creates a codeword. Then the receiver checks if the 1's are even or odd and based on that, we know that there was corruption during transmission.
For example:
dataword = 101
redundancy bit = 0
codeword = 0101
At the receiver side, we check if the 1's are even, if they are, we conclude that the data is not corrupted.

In my question, I do not understand what "all dataword possibilities" mean.
So, the question specifies that I am supposed to use 5 bits for the dataword. This means that from '00000' up to '11111' are valid datawords. I don't know what to do next. Do I just add 1 redundancy bit for 2^5 = 32 datawords? This seems wrong. I feel like I am missing something.
 
on Phys.org
Welcome to PF. :smile:

SumDood_ said:
In my question, I do not understand what "all dataword possibilities" mean.
So, the question specifies that I am supposed to use 5 bits for the dataword. This means that from '00000' up to '11111' are valid datawords. I don't know what to do next.

You basically have it correct. Your table is 2^5 entries of 5 bits each, with one extra parity bit appended at the end to maintain the even or odd parity (whichever is specified) for each codeword. It's often easiest to generate this with Excel, but with only 32 entries you can do it by hand as easily.

https://en.wikipedia.org/wiki/Parity_bit

BTW, a single redundant parity bit can only reliably detect a single bit error in a codeword. With more redundant bits added, you can design the redundant code to detect multiple bit errors and even help with error correction. You'll likely encounter those encodings later in your class.
 
Last edited:
Reply
  • Like
Likes   Reactions: SumDood_ and pbuk
SumDood_ said:
For example:
dataword = 101
redundancy bit = 0
codeword = 0101
Note that here you have prepended the parity bit (i.e. added it at the beginning). We usually add it at the end (can you think why?), and you have also described adding the parity bit at the end in your question: "n = k + r".
 
Reply
  • Like
Likes   Reactions: SumDood_ and berkeman
pbuk said:
Note that here you have prepended the parity bit (i.e. added it at the beginning). We usually add it at the end (can you think why?), and you have also described adding the parity bit at the end in your question: "n = k + r".
Ah, thanks for pointing that out. I am not sure, though, why it should be added at the end.
 
berkeman said:
Welcome to PF. :smile:
You basically have it correct. Your table is 2^5 entries of 5 bits each, with one extra parity bit appended at the end to maintain the even or odd parity (whichever is specified) for each codeword. It's often easiest to generate this with Excel, but with only 32 entries you can do it by hand as easily.

https://en.wikipedia.org/wiki/Parity_bit

BTW, a single redundant parity bit can only reliably detect a single bit error in a codeword. With more redundant bits added, you can design the redundant code to detect multiple bit errors and even help with error correction. You'll likely encounter those encodings later in your class.
From what I know, a single bit would detect an odd number of errors.
Thanks for your help!