The positive voltage from the source is directed away from the output C and towards A and B via the diodes connected directed towards the inputs. When positive logic that is equal to or greater than that of the source is applied to all inputs the source voltage is directed to the output. The AND gate is capable of an arbitrary number of inputs.