In an AND gate, the output is 1 only when inputs A and B are set to 1. In an AND gate, the output is determined by the logic operation it performs on its inputs.