Comp Sci Parity Check Question -- University Level Intro Course: Networking

AI Thread Summary
Parity checks are used to detect errors in data transmission by adding a redundancy bit to a dataword, creating a codeword that can be checked for even or odd parity. In this discussion, the focus is on understanding how to generate all possible datawords using 5 bits, which results in 32 valid combinations ranging from '00000' to '11111'. Each of these datawords should have one parity bit appended to maintain the specified parity. It is noted that while a single parity bit can detect single-bit errors, additional redundancy can help detect multiple errors and facilitate error correction. The conversation emphasizes the importance of appending the parity bit at the end of the codeword for clarity and consistency.
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.
 
Physics news 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:
  • Like
Likes 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".
 
  • Like
Likes 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!
 

Similar threads

Replies
2
Views
2K
Replies
8
Views
2K
Replies
7
Views
2K
Replies
2
Views
4K
Replies
12
Views
3K
Back
Top