4-bit odd parity generator - am I right?

Thread Starter

jigamuffin

Joined Feb 27, 2012
1
I often make mistakes in the class that I need this for, so I was wondering if you guys could help me out with this 4-bit odd parity generator? I need to make it in my first lab tomorrow.
I think I'm right, but I don't know. If I am right, is there a better/neater way to set it out?

 

panic mode

Joined Oct 10, 2011
5,222
three XOR gates should do the job:

one compares bits 0 and 1
next compares bits 2 and 3
last one compares outputs of previous two gates....
 

Georacer

Joined Nov 25, 2009
5,182
I think you have built a circuit for even parity.

A XOR gate checks for odd parity, ie 1 XOR 0 = 1
Also, this is associative; A XOR B XOR C= (A XOR B) XOR C and this checks for 3-bit odd parity.

On the contrary NXOR gates check for even parity.

Also A XOR B=AB'+A'B
and A NXOR B=AB+A'B'

Given the above, you should make some changes in your circuit.
 

panic mode

Joined Oct 10, 2011
5,222
as mentioned XOR is associative and checking 4-bits takes same number of gates (three):

(((A XOR B) XOR C) XOR D

the only downside is that propagation time of gates adds up,
so it timing if important, it is better to do

(A XOR B) XOR (C XOR D)
 
Top