4-bit odd parity generator - am I right?

Discussion in 'Homework Help' started by jigamuffin, Mar 5, 2012.

  1. jigamuffin

    Thread Starter New Member

    Feb 27, 2012
    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?

  2. panic mode

    Senior Member

    Oct 10, 2011
    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....
  3. Georacer


    Nov 25, 2009
    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.
  4. panic mode

    Senior Member

    Oct 10, 2011
    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)