Q-Implement the parity generator (a) Even (b) Odd for 3-bit message
Ans: (a) Following is the truth table and K-map for even parity
a b c P(even)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
K-MAP:

Hence the equation we get is P (even) = x xor y xor z
OR P (even) = x xnor y xnor z
(b) Following is the truth table and K-map for odd parity
a b c P(odd)
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
K-MAP:

Hence the equation we get is P (odd) = x xnor y xor z = x xor y xnor z = (x xor y xor z)’ = (x xnor y xnor z)’
Hence we see that equations for Parity change with odd or even number of variables
For odd number of variables
P (even parity) = x xor y xor z = x xnor y xnor z
P (odd parity) = x xnor y xor z = x xor y xnor z = (x xor y xor z)’ = (x xnor y xnor z)’
For even number of variables
P (even parity) = x xor y xor z xor w
P (odd parity) = x xnor y xnor z xnor w
We can similarly implement the following by writing their TRUTH TABLES and drawing their K-MAPS like
(a) Conversion of binary to Excess-3
(b) Conversion of binary to BCD