-4
\$\begingroup\$

I'm just wondering what logic gate has two inputs and only outputs HIGH if one of the inputs is HIGH. Here's a truth table:

|-----------|-----------|-----------|
|     A     |     B     |    OUT    |
|-----------|-----------|-----------|
|     0     |     0     |     0     |    
|-----------|-----------|-----------|
|     1     |     0     |     1     |    
|-----------|-----------|-----------|
|     0     |     1     |     1     |    
|-----------|-----------|-----------|
|     1     |     1     |     0     |    
|-----------|-----------|-----------|

A and B would be two inputs. Thanks in advance!

P.S. If you're going to close this question, can you at least answer it before you do? Thanks!

\$\endgroup\$
2
  • 2
    \$\begingroup\$ There are only 4 rules in state logic, study them , OR, AND, XOR, INV, yet 144 Rules for bad logic called fallacies created by Aristotle around 500 BCE inspired by many others. They still hold true today. \$\endgroup\$ Oct 23, 2020 at 17:34
  • 3
    \$\begingroup\$ seriously, how many logic gates do you know? Was it Really easier to write this question then to go through them and check which one matches your table? If it actually was easier to write this question, you still need to learn these... \$\endgroup\$ Oct 23, 2020 at 19:56

2 Answers 2

3
\$\begingroup\$

This is an XOR gate. It outputs HIGH when an odd number of inputs are HIGH.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ your description of the XOR gate is incorrect because it applies only to the 2 input XOR gate and it is confusing to beginners ... in reality the output is HIGH if an odd number of inputs are HIGH \$\endgroup\$
    – jsotola
    Oct 24, 2020 at 3:42
  • 1
    \$\begingroup\$ The definition of the XOR function for more than 2 inputs is not standardized, and this has been discussed before on EE.SE. One definition emphasizes the exclusive nature and asserts that the XOR of inputs is true if one and only one input is true. The other definition is that the XOR of more than 2 inputs is the odd parity function, but the IEEE recommends using a different symbol than the common XOR if that is the function you intend. \$\endgroup\$ Oct 26, 2020 at 1:04
  • 1
    \$\begingroup\$ See this discussion electronics.stackexchange.com/questions/93713/… \$\endgroup\$ Oct 26, 2020 at 1:08
  • \$\begingroup\$ Thanks, @ElliotAlderson. Honestly speaking, I haven't used XOR with more than 2 inputs. \$\endgroup\$
    – Light
    Oct 26, 2020 at 1:10
1
\$\begingroup\$

It's an 'Exclusive OR Gate' (XOR Gate). It outputs a 'high' only when an odd number of its inputs is 'high'.

It's unlike an 'OR' gate which outputs a 'high' with one or more of it's inputs being 'high'.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Sorry, this is not exactly right. See the discussion here electronics.stackexchange.com/questions/93713/… \$\endgroup\$ Oct 26, 2020 at 1:09
  • \$\begingroup\$ @Elliot Alderson, Looks like opinions are divided 50:50 for my answer. My original answer was for only one input being high giving a high output. I changed that after receiving a comment to the contrary and reading up. Now I am back to square one! Many thanks. \$\endgroup\$
    – vu2nan
    Oct 26, 2020 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.