How could a GAA scoreboard tell if exactly one of two test buttons is pressed?
A GAA scoreboard has two test buttons. You want a light to come on when you press either button by itself. If you press both at once, the light should stay off. How can the scoreboard tell the difference?
Think of a button that's either released or pressed. In this circuit, you represent those two states with a low signal, zero, and a high signal, one. That's a digital input. An analogue input, such as the voltage from a dimmer dial, can vary continuously between values.
Watch a zero go in. A one comes out. The gate has flipped the input to the other bit value. This is a NOT gate. It takes just one input and gives you the opposite value.
You've seen what happens when the input is low. Now feed a high signal, binary one, into the NOT gate. What output will the gate give you? Pick an answer.
Start with A at zero and give B both values. Then set A to one and give B both values again. That gives all four rows. Compare the outputs: AND gives one only when both inputs are high. OR gives one when at least one is high.
Take the AND column and flip each output. Its final one becomes zero, and the other three rows become ones. That's NAND, or NOT AND. Now flip the OR column. Only the first row becomes one. That's NOR, or NOT OR.
Send both inputs to OR and NAND, then AND their outputs to make exclusive OR. For zero, zero, the outputs are zero and one, so the result is zero. For zero, one and one, zero, both outputs are one. For one, one, the outputs are one and zero, giving zero.
Keep input A high. First set B high, then switch B to low. Think about how many inputs are high each time. What are the two exclusive OR outputs in that order? Pick a pair.
It's easy to read the word or as a choice between two things. With both inputs high, that reading would make you write zero for OR. In a logic circuit, OR is inclusive, so both high still gives one. XOR is the gate that gives zero here.
State the output Q when A and B are both one. Start with the OR circuit. At least one input is high, so Q is one. Now replace OR with XOR. The inputs are still both high, so Q changes to zero.