-4

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!

Tyler Selden
  • 175
  • 1
  • 6
  • 2
    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. – Tony Stewart EE75 Oct 23 '20 at 17:34
  • 3
    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... – Marcus Müller Oct 23 '20 at 19:56

2 Answers2

3

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

Light
  • 323
  • 1
  • 2
  • 12
  • 1
    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 – jsotola Oct 24 '20 at 03:42
  • 1
    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. – Elliot Alderson Oct 26 '20 at 01:04
  • 1
    See this discussion https://electronics.stackexchange.com/questions/93713/how-is-an-xor-with-more-than-2-inputs-supposed-to-work – Elliot Alderson Oct 26 '20 at 01:08
  • Thanks, @ElliotAlderson. Honestly speaking, I haven't used XOR with more than 2 inputs. – Light Oct 26 '20 at 01:10
1

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'.

vu2nan
  • 15,929
  • 1
  • 14
  • 42
  • 1
    Sorry, this is not exactly right. See the discussion here https://electronics.stackexchange.com/questions/93713/how-is-an-xor-with-more-than-2-inputs-supposed-to-work – Elliot Alderson Oct 26 '20 at 01:09
  • @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. – vu2nan Oct 26 '20 at 04:05