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
Maybe you just need to understand the exclusive OR function - http://www.play-hookey.com/digital/xor_function.html
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.
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.
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)
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.
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)
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 ...
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?
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.
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?
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.
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.
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
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?
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.