Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of these is the correct Boolean expression for an XOR gate?

  • A.\( A\bar{B} + \bar{A}B \)
  • B.\( AB + \bar{A}\bar{B} \)
  • C.\( A + B \)
  • D.\( AB \)

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.