Introduction:
Many digital designs use a gate as a conditional inverter. The idea is to feed the data signal on one input and a control signal on the other so that sometimes the output equals the input and other times it equals the inverted input. This question asks which 2-input gate provides exactly that behavior.
Given Data / Assumptions:
- Two inputs: Data D and control C
- Goal: Output X equals D when C = 0 and equals NOT D when C = 1
Concept / Approach:
XOR implements X = D XOR C. When C = 0, XOR acts as a buffer (X = D). When C = 1, XOR acts as an inverter (X = NOT D). This is why XOR is often described as a controlled inverter or programmable inverter.
Step-by-Step Solution:
Step 1: Define X = D XOR C.Step 2: If C = 0, then X = D XOR 0 = D.Step 3: If C = 1, then X = D XOR 1 = NOT D.
Verification / Alternative check:
XNOR (the complement) would pass when C = 1 and invert when C = 0, which is the opposite control convention but not what is usually meant by controlled inversion from the question wording.
Why Other Options Are Wrong:
XNOR gate: Acts as pass when control is 1 and invert when control is 0; opposite polarity.NAND gate: Does not provide clean pass vs invert based solely on a single control bit.OR gate: Cannot invert the data based on a single control in this simple configuration.
Common Pitfalls:
Confusing XOR with XNOR; pay attention to control polarity.Assuming any two-input gate can be wired to behave like a controlled inverter without extra logic.
Final Answer:
XOR gate
Discussion & Comments