Q-Implement the parity generator (a) Even (b) Odd for 4-bit message
Ans: (a) Following is the truth table and K-map for even parity
Binary number Parity (even)
0000 0
0001 1
0010 1
0011 0
0100 1
0101 0
0110 0
0111 1
1000 1
1001 0
1010 0
1011 1
1100 0
1101 1
1110 1
1111 0
K-MAP for even parity:

We know this is the K-map for XOR gate. Hence the equation we get is P (even) = x xor y xor z xor w
(b) Following is the truth table and K-map for odd parity
Binary number Parity (odd)
0000 1
0001 0
0010 0
0011 1
0100 0
0101 1
0110 1
0111 0
1000 0
1001 1
1010 1
1011 0
1100 1
1101 0
1110 0
1111 1
K-map for odd parity:

We know this is K-map for XNOR gate. Hence the equation we get is P (odd) = x xnor y xnor z xnor w