Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the...
-
Upload
evan-rodgers -
Category
Documents
-
view
221 -
download
3
Transcript of Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the...
![Page 1: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/1.jpg)
Parity Generator and Checker
![Page 2: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/2.jpg)
Parity bit
• A parity bit is a bit that is added to
ensure that the number of bits with the
value one in a set of bits is even or odd.
• Parity bits are used as the simplest form
of error detecting code.
![Page 3: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/3.jpg)
Parity bit
![Page 4: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/4.jpg)
Types of parity bit
• There are two variants of parity bits
• Even parity bit
• Odd parity bit
![Page 5: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/5.jpg)
Even parity
• When using even parity, the parity bit is set to 1 if
the number of ones in a given set of bits (not
including the parity bit) is odd, making the entire
set of bits (including the parity bit) even.
• Example of even parity is 00000000, 11010001
![Page 6: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/6.jpg)
Odd parity bit
• When using odd parity, the parity bit is set to 1
if the number of ones in a given set of bits (not
including the parity bit) is even, keeping the
entire set of bits (including the parity bit) odd.
• Example of Odd parity is 10000000, 01010001
![Page 7: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/7.jpg)
Odd and Even parity
• An even parity bit will be set to "1" if the
number of 1's + 1 is even
• An odd parity bit will be set to "1" if the
number of 1's +1 is odd.
![Page 8: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/8.jpg)
Parity bit table7 bits of data
(number of 1s)
8 bits including parity bit
Even Odd
0000000 (0) 00000000 10000000
1010001 (3) 11010001 01010001
1101001 (4) 01101001 11101001
1111111 (7) 11111111 01111111
![Page 9: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/9.jpg)
Parity generator and checkers
Sender Receiver
n-bit code Parity
Generator
(n+1)-bit code Parity
CheckerError
![Page 10: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/10.jpg)
XY
Z P
XY
ZE
P
Even parity generator and checker for 3-bit codes
![Page 11: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/11.jpg)
Solution
• Use 3-bit odd function to generate even parity
bit
• Use 4-bit odd function to check for errors in
even parity codes
• Operation: (X,Y,Z) = (0,0,1) gives (X,Y,Z,P) =
(0,0,1,1) and E = 0
• If Y changes from 0 to 1 between generator
and checker, then E = 1 indicates an error
![Page 12: Parity Generator and Checker. Parity bit A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is.](https://reader036.fdocuments.us/reader036/viewer/2022082417/56649d055503460f949d9057/html5/thumbnails/12.jpg)
The End
….. Thank you….