0

I am looking for a three-input, one-output logic-gate from the following truth table:

$$\begin{array}{c|c|c|} \text{C} & \text{B} & \text{A} & \text{Output} \\ \hline 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 1 & 1 \\ \hline 0 & 1 & 0 & 1 \\ \hline 0 & 1 & 1 & 0 \\ \hline 1 & 0 & 0 & 1 \\ \hline 1 & 0 & 1 & 0 \\ \hline 1 & 1 & 0 & 0 \\ \hline 1 & 1 & 1 & 1 \\ \hline \end{array}$$

As I can see \$A\$ and \$B\$ acts as XOR-gate when \$C=0\$, and as a XNOR-gate when \$C=1\$. Im looking to order a gate that has these input- and output pins, and the required operation pins to make it work. Im just wondering whats the name of the gate? Looking for one in the 74 or HC family, or one that is easy to put on breadboards.

3 Answers3

2

What you're looking for is a 3-input XOR gate. 74x1G386 is one such chip. Here's a link to the datasheet.

hallgren
  • 111
  • 4
  • That's interesting. Its output switches high when any one input is high or when all three inputs are high. It looks to me more like an 'Odd-OR' gate since it switches high on an odd number of high inputs. – Transistor Mar 17 '20 at 15:34
  • Yes, since an n-input XOR performs addition modulo 2, switching high on an odd number of inputs is exactly what it does. You can verify that the truth table on page three of the datasheet matches the requested truth table. – hallgren Mar 17 '20 at 15:38
  • I did check it before I commented. Thanks. – Transistor Mar 17 '20 at 15:44
  • Apparently there are differing views on the definition of multiple input XOR gates: https://electronics.stackexchange.com/a/93719/245193 'Odd-OR' is certainly more appropriate for this type. – hallgren Mar 17 '20 at 15:47
1

This doesn't look like a commonly required function so I doubt that anyone made one. (I was proven wrong by hallgren.)

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. A solution using two XNOR gates.

If my thinking is straight Figure 1 gives a simple solution.

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • Seems your solution also works. There does also exist 3-input XNOR gates. Seems like 3 input XOR = 3 input XNOR. That is \$A \oplus B \oplus C = A \odot B \odot C \$, if we switch the inputs though. – Natural Number Guy Mar 17 '20 at 16:14
0

74HC151 Blah, blah, blah (need 30 characters)

  • You yould have used the additional characters as well to explain why you think this would be a good solution. – jusaca Mar 18 '20 at 07:40