Is it Possible 4 input XOR gate ? why ?

hp1729

Joined Nov 23, 2015
2,304
MOD NOTE: This post was originally a response to a long-dead thread of the same title and was split off so that any new responses won't generate notifications to long-gone participants.

It is indeed possible if your definition of a multi-input XOR is: result is high if exactly one of the inputs is high. For 3 inputs, in boolean algebra, given inputs a, b, and c, and output y (& = AND, ^ = XOR, | = OR):

y = ((a ^ b) ^ c) ^ (a & b & c)

This can be expanded to support four inputs:

y = (((a ^ b) ^ c) ^ d) ^ (a & b & c & d) ^ ((a & b & c) | (b & c & d) | (a & c & d) | (a & b & d))

and so on. It's provable by running it through a truth table.

A 3 input XOR as a circuit:
View attachment 91417
Wasn't this called a Majority input gate? DTL had them but they never made the transition to TTL. If the majority of the inputs were high the output was high. If the majority of the inputs were low the output was low.
 

hp1729

Joined Nov 23, 2015
2,304
MOD NOTE: This post was originally a response to a long-dead thread of the same title and was split off so that any new responses won't generate notifications to long-gone participants.

It is indeed possible if your definition of a multi-input XOR is: result is high if exactly one of the inputs is high. For 3 inputs, in boolean algebra, given inputs a, b, and c, and output y (& = AND, ^ = XOR, | = OR):

y = ((a ^ b) ^ c) ^ (a & b & c)

This can be expanded to support four inputs:

y = (((a ^ b) ^ c) ^ d) ^ (a & b & c & d) ^ ((a & b & c) | (b & c & d) | (a & c & d) | (a & b & d))

and so on. It's provable by running it through a truth table.

A 3 input XOR as a circuit:
View attachment 91417
Didn't old DTL have such devices? 9109 or 4530. Called Majority input gates.
 

WBahn

Joined Mar 31, 2012
30,071
As discussed earlier in the thread, there are several reasonable definitions of how a multi-input XOR gate should behave. The general, though not necessarily universal, long-time industry consensus is that it behaves as an odd parity detector.
 
Top