AND gate truth table | |||
---|---|---|---|
Input | Output | ||
A | B | A AND B | |
The AND gate is a basic digital logic gate that implements logical conjunction (∧) from mathematical logic AND gate behaves according to the truth table. A HIGH output (1) results only if all the inputs to the AND gate are HIGH (1). If not all of the inputs to the AND gate are HIGH, a LOW output results. The function can be extended to any number of inputs.
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 Logic gate symbols article. It can also be denoted as symbol "^" or "&".
The AND gate with inputs A and B and output C implements the logical expression
C=A ⋅ B
C=A\wedgeB
C=A\AndB
In logic families like TTL, NMOS, PMOS and CMOS, and 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.
f(a,b)=a*b
f(0,0)=0*0=0
f(0,1)=0*1=0
f(1,0)=1*0=0
f(1,1)=1*1=1
If no specific AND gates are available, one can be made from NAND or NOR gates, because NAND and NOR gates are "universal gates" [1] meaning that they can be used to make all the others.
AND gates with multiple inputs are designated with the same symbol, with more lines leading in.[2] 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 right.[3]