Skip to content
BetterDL

AND gate

Also called: AND logic gate, logical AND gate

A logic gate whose output is 1 only when every one of its inputs is 1. It is written AB, with the letters side by side, and acts like switches in series.

An AND gate outputs 1 only when all of its inputs are 1. If even one input is 0, the output is 0. For two inputs it is written (or A·B) and read "A and B".

A good mental picture is two switches wired one after the other in front of a lamp. Current reaches the lamp only if both switches are closed. Call closed 1 and lit 1, and you have AND's truth table: a single 1, in row 11.

Writing AND like multiplication is no accident. For 0s and 1s the two agree: 1 · 1 = 1, and anything times 0 is 0.

The symbol has a flat back, where the inputs enter, and a round front, like a capital D.

A handy way to think about AND is as a gate in the everyday sense. If one input is a control signal, then:

  • a control of 1 lets the other input through unchanged: = A.
  • a control of 0 blocks it and forces 0: = 0.

That is how enable signals work in decoders and multiplexers. AND gates also form the first level of every sum of products circuit, and with more inputs they become multi-input gates.

ABY

Worked example

Example

Using AND as an enable

A sensor signal S should reach an alarm only while a switch E is on. Y = . Check all four rows.

Y
000
010
100
111
  1. 1.

    E = 0, S = 0: Y = 0. The alarm is off.

  2. 2.

    E = 0, S = 1: Y = 0. The sensor fires, but E blocks it.

  3. 3.

    E = 1, S = 0: Y = 0. Nothing to report.

  4. 4.

    E = 1, S = 1: Y = 1. The sensor's 1 passes straight through.

  5. 5.

    With E = 1 the output copies S; with E = 0 it is stuck at 0.

Common mistakes

  • Thinking AND is 1 when "most" inputs are 1. One 0 anywhere forces the output to 0.

  • Mixing up the symbols: AND has a flat back and round front; OR has a curved back and a pointed front.

  • Reading as a two-letter variable name. Letters side by side always mean AND in this notation.

Practice AND gate

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

AND gate is taught in Logic Gates.