AND gate

{{short description|Digital logic gate type}}

class="wikitable floatright" style="text-align:center"
colspan="3" | AND gate truth table
bgcolor="#ddeeff"

|colspan=2|Input

Output
bgcolor="#ddeeff"

| A

BA AND B
{{no2|0}}{{no2|0}}{{no2|0}}
{{no2|0}}{{yes2|1}}{{no2|0}}
{{yes2|1}}{{no2|0}}{{no2|0}}
{{yes2|1}}{{yes2|1}}{{yes2|1}}

The AND gate is a basic digital logic gate that implements the logical conjunction (∧) from mathematical logic{{snd}} AND gates behave according to their truth table. A HIGH output (1) results only if all the inputs to the AND gate are HIGH (1). If any of the inputs to the AND gate are not HIGH, a LOW (0) is outputted. The function can be extended to any number of inputs by multiple gates up in a chain.

Symbols

There are three symbols for AND gates: the American (ANSI or 'military') symbol and the IEC ('European' or 'rectangular') symbol, as well as the deprecated DIN symbol. Additional inputs can be added as needed. For more information see the Logic gate symbols article. It can also be denoted as symbol "^" or "&".

align=center style="text-align:center"

|Image:AND ANSI.svg

|Image:AND IEC.svg

|image:AND DIN.svg

MIL/ANSI symbol   

|IEC symbol   

|DIN symbol

The AND gate with inputs A and B and output C implements the logical expression C = A \cdot B. This expression also may be denoted as C=A \wedge B or C=A \And B.

As of Unicode 16.0.0, the AND gate is also encoded in the Symbols for Legacy Computing Supplement block as {{Unichar|1CC16}}.

Implementations

{{Gallery

|File:DiodeANDgate.png|AND gate using diodes

|File:TransistorANDgate.png|AND gate using transistors

|File:NMOS AND gate.png|NMOS AND gate

|File:Cmos and.svg|CMOS AND gate

}}

In logic families like TTL, NMOS, PMOS and CMOS, an AND gate is built from a NAND gate followed by an inverter. In the CMOS implementation above, transistors T1-T4 realize the NAND gate and transistors T5 and T6 the inverter. The need for an inverter makes AND gates less efficient than NAND gates.

AND gates can also be made from discrete components and are readily available as integrated circuits in several different logic families.

= Analytical representation =

f(a,b)=a*b is the analytical representation of AND gate:

  • f(0,0)=0*0=0
  • f(0,1)=0*1=0
  • f(1,0)=1*0=0
  • f(1,1)=1*1=1

= Alternatives =

{{further|NAND logic|NOR logic}}

If no specific AND gates are available, one can be made from NAND or NOR gates, because NAND and NOR gates are "universal gates"

Mano, M. Morris and Charles R. Kime. Logic and Computer Design Fundamentals, Third Edition. Prentice-Hall, 2004. p. 73. meaning that they can be used to make all the others.

align=center style="text-align:center"

! width="250" |Desired gate!! width="150" |NAND construction!! width="150" |NOR construction

Image:AND ANSI Labelled.svgImage:AND from NAND.svgFile:AND from NOR.svg

= AND gates with multiple inputs =

AND gates with multiple inputs are designated with the same symbol, with more lines leading in.{{Cite web |url=https://www.allaboutcircuits.com/textbook/digital/chpt-3/multiple-input-gates/ |title=Multiple-input Gates |access-date=2024-02-04 |publisher=All About Circuits}}

While direct implementations with more than four inputs are possible in logic families like CMOS, these are inefficient. More efficient implementations use a cascade of NAND and NOR gates, as shown in the picture on the right below. This is more efficient than the cascade of AND gates shown on the left.

{{Cite web |url=https://tams.informatik.uni-hamburg.de/applets/hades/webdemos/10-gates/00-gates/andbig.html |title=AND gate (12 inputs) |access-date=2024-02-04 |author=Norman Hendrich |publisher=Universität Hamburg}}

12 input AND gate via cascade of AND gates.svg|A 12-input AND gate realized as a cascade of AND gates

12-input AND gate from NAND and NOR.svg|12-input AND gate made from 3 NAND and 1 NOR gate

See also

References