Logic circuits
When is the output of a 2-input OR gate 0?
- AWhen the two inputs differ
- BWhen both inputs are 0
- CWhen both inputs are 1
Show answer and explanation
Answer: B. When both inputs are 0
An OR gate (logical disjunction) outputs 1 if at least one input is 1; it outputs 0 only when every input is 0. It behaves like switches in parallel, used for control that acts if any condition holds—for example, combining several interrupt requests, or setting bits in bitwise operations (for an 8-bit value, x OR 0x80 sets the top bit).
- A. When the inputs differ, the OR output is 1.
- B. Correct. OR outputs 0 only when all inputs are 0.
- C. When both inputs are 1, the OR output is 1.