Which of these is the correct Boolean expression for an XOR gate?
Answer: C
Correct answer: \( A\bar{B} + \bar{A}B \)
The XOR function is 1 when the two inputs differ, which happens in exactly two cases: A is 1 and B is 0, or A is 0 and B is 1. Written as a sum of products that is \[ A \oplus B = A\bar{B} + \bar{A}B. \] The second option, \( AB + \bar{A}\bar{B} \), is 1 when the inputs are the same, and is therefore the complement - the XNOR function, also called the equivalence or coincidence gate. XOR has properties that make it unusually useful. \( A \oplus 0 = A \) and \( A \oplus 1 = \bar{A} \), so one input acts as a controlled inverter. \( A \oplus A = 0 \), which is why XOR finds the unpaired element in a list and why it underlies simple ciphers and the swap-without-a-temporary trick. In arithmetic it produces the SUM output of a half adder, and cascaded it generates and checks parity bits.
Please log in or register to report this question.