A logic gate is an electronic circuit that performs Boolean logic operations on binary inputs to produce binary outputs - essentially making logic decisions. Option B describes a diode, not a logic gate. Since B is incorrect, 'Both A and B' cannot be correct.