Multiple choice general knowledge science & technology

if a=0, b=1 a xor b =?

  1. 0

  2. 1

  3. infinity

  4. null

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

XOR (exclusive OR) returns 1 only when exactly one input is 1. With a=0 and b=1, exactly one input is 1, so the result is 1. XOR would return 0 only if both inputs were the same (both 0 or both 1).