Parity Check Question -- University Level Intro Course: Networking

In summary, parity check is a method used to detect errors in data transmission by adding a parity bit to the dataword, resulting in a codeword. The receiver then checks if the number of 1's is even or odd to determine if there was corruption during transmission. To generate the codewords, all possible datawords must be considered and a single parity bit is usually added at the end. However, with more redundant bits, errors can be detected and corrected.
  • #1
SumDood_
30
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
  • #2
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
  • #3
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
  • #4
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.
 
  • #5
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
1
Views
1K
Replies
3
Views
3K
Replies
8
Views
2K
Replies
1
Views
1K
Replies
7
Views
2K
Replies
3
Views
1K
Replies
2
Views
4K
Back
Top