Logic gates

Discussion in 'Homework Help' started by The Rocketeer, Oct 20, 2010.

  1. The Rocketeer

    Thread Starter New Member

    Oct 20, 2010
    7
    0
    Hi everyone,
    I need help with this question. I couldn't understand how to sole it.

    Q: Construct the truth table for a 4-input XOR gate?



    Thanks:)
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. The Rocketeer

    Thread Starter New Member

    Oct 20, 2010
    7
    0
    Thank you beenthere~ ;)
     
  4. The Rocketeer

    Thread Starter New Member

    Oct 20, 2010
    7
    0
    I heard the XOR gate can only have 2-input. What do you think guys about this? That's why I couldn't solve the question.
     
  5. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    A 3 input XOR can exist. It's logical function is the same as if you XORed the two inputs and XORed the result with the third.

    The XOR operation can be expanded through induction.
     
  6. The Rocketeer

    Thread Starter New Member

    Oct 20, 2010
    7
    0
    How about 4-input?
     
  7. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    It's exactly tha same:
    F=(((A XOR B) XOR C) XOR D)

    And I think it can be proven that the above is equal to:
    (A XOR B) XOR (C XOR D)
     
  8. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,164
    Georacer,

    Your description of the three input XOR isn't exclusive. If we follow the logic that a zero output only occurs when all the inputs are either 0 or 1, when the three input xor you described would produce a zero output when the input A and input B is 1, vice a one.
     
  9. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    I didn't quite get what you were trying to tell me, so I 'll rephrase what I said in hope we will clarify our positions.

    A 2-input XOR outputs 1, if only 1 input is HIGH.
    A 3-input XOR outputs 1, if 1 or 3 inputs are HIGH.
    In general a multi-input XOR gate implements the odd function. It ouputs 1 if the number of inputs that are HIGH is odd. Otherwise it outputs 0.

    The way to implement a multi-input XOR are with 2-input XOR gate IC's is flexible. For example, for a 4 input XOR, you can do it either as:
    (((A XOR B) XOR C) XOR D) or:
    (A XOR B) XOR (C XOR D)
    or with any other possible permutation. Notice that the number of 2-input XOR operation remains always the same.
    Therefore the above operation can be described generaly as:
    A XOR B XOR C XOR D

    This is possible because the XOR operation is both assiciative and commutive.

    (double-checked on bibliography and wikipedia)
     
  10. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,164
    Georacer,

    Attached is the example of your three input xor ... where you xor A&B and then xor'd that result with C.

    As you can tell the zero output occurs at more places than all inputs set to zero or all inputs set to 1.

    On edit ... Added truth table for exclusive OR ...
     
    Last edited: Oct 23, 2010
  11. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    Is there any chance that you misread the diagram?

    As I see in the time diagram, on t=375-500us we have ABC=011 and Y=0, unlike what you have written on your table.
    It is the same on t=625-750us for ABC=101 and Y=0 and
    on t=750-875us for ABC=110 and Y=0

    P.S. On what software is this diagram plotted?
     
  12. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,164
    The software was tina-ti

    The truth table is for an exclusive whose output follows the exclusive or rules and is not for the circuit shown.
     
  13. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    So where does that leave our argument? Do you agree with me about the logic diagram describing a 3-input XOR correctly as opposed to the the table that does not?
     
  14. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,164
    I'm sticking with the truth table.

    I have read the patent showing prior art for a 3 input xor as you described. I've also am reading a later patent that would supports the truth table.

    We are at an impasse right now, pending further investigation.

    Attached is an XNOR patent that without the inverter, would support the truth table I posted earlier.

    on edit ...

    Also attached is the three input xor circuit, truth table, and time ladder diagram.
     
    Last edited: Oct 23, 2010
  15. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    I still believe that you have a wrong idea about what a 3-input XOR function is.

    This time you posted the schematic and time diagram of a circuit that has nothing to do with the 3-input XOR. The function it describes is
    F=((A XOR B) XOR (A XOR C)) OR ((A XOR C) XOR (B XOR C)) and not
    F=(A XOR B) XOR C

    Take a look at figures 7 and 8 in the pdf you posted. The inventor has denoted the correct gate layout and the truth table.

    I haven't read thorougly the whole document, so let me know if I have a misconception.
     
  16. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    To state it simply, all ones or all zeros output a one. All other conditions output a zero.
     
  17. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    @Bill

    So you reject Figure 7, Column X of the pdf at post #14?
     
  18. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,164
    Georacer,

    After reflection and alot more reading, the xor function must maintain it's exclusiveness with just A, B, C, ... and all other combinations of "1's" or all "0's" must produce the "0" output.

    The XOR function is A B' + A' B

    Adding a third input would require A B' C' + A' B C' + A' B' C otherwise the exclusiveness test would fail.

    Anyways, I'd appreciate your viewing the attached.

    Thanks
     
  19. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    I 'm afraid it's not about what I or you want a 3-input XOR to be, but about what the market and the established knowledge wants it to be.

    The exclusiveness and the relevant name have dominatated because XOR usualy comes as a 2-input. For this number of inputs this notion is visible. But take a look at a real-life 3-input XOR: http://www.datasheetcatalog.org/datasheets2/27/277426_1.pdf

    For more inputs who said we want the same thing? It's a matter of definition. I think the odd function is much more useful than finding when we have only one 1.

    You yourself posted a US patent of a 3-input XOR. Why do you disaprove it? If that doesn't make it a valid exhibit, I don't know what does.
    You can also look at M. Mano's Digital Design, a best-seller in its domain. In the fourth edition, page 61, a truth table of a 3-input XOR is drawn. It is exactly like the one in the Patent.

    There is an amplitude of clues that show that the world wants a multi-input XOR to work as an odd funtion. Why do you deny it?
     
  20. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    OK, point conceded. It is an adder after all, if the three inputs add to an odd number the output is high, if they add to an even number it is a zero.
     
Loading...