EducationWhat is AND Gate ? How to make AND Gate - Theory

What is AND Gate ? How to make AND Gate – Theory

Category articles

AND gate is a digital logic gate that has two or more inputs and one output to perform logical conjunction. The output of an AND gate is high only when all of the inputs are high. If one or more of an AND gate’s inputs are low, then the output of the AND gate is low.

In simple words,

  • It only turns on when all the inputs are ON
  • If only one input is on, then output turns OFF
  • If all the inputs are off, then output turns OFF

logic AND Gate symbol


AND Gate Logic

Now we all know that in the logic world AND is represented as “ .”. If you want to represent an output Y as A AND B you have to write it as Y= A.B. You can see this dot(.) as a multiplication sign(x). Actually in AND gate if you want to get the output as high you have to set all the input in logic high. If somehow one input becomes low then the output will be low.

Here we will give you two examples so that you can do it yourself.

Let us consider there is an AND gate with its input A and B and the output is Y=A.B. Now you can write the AND gate truth tabele as below:

logic AND Gate symbol logiclogic and gate truth table

As we know that an AND gate may have more than two inputs so we can write the truth table for that case also just by following the same method.

How to make AND Gate

We can build an AND Gate using a transistor. Operation of an AND gate depends on transistor switching speed. Generally, we use transistors as a switch for AND Gate operation. We use BC547 Transistor, a general purpose NPN transistor, here because in common emitter configuration it is able to give a high output when input is low. This is happening due to a change in a phase shift of 180 degrees. BC547 is widely used due to its low power consumption and low switching frequency. You can use other transistors such as BC548 and BC549 also to build an AND gate.

Here we will show how to build an AND Gate using a transistor.

Required Components:

  1. BC547 NPN transistor ( 2pcs.)
  2. 1k Resistor (1pcs)
  3. 10k Resistor(3pcs)
  4. 4.7k Resistor(1pcs)
  5.  toggle switches(2pcs)
  6. General-purpose LED
  7. 5V Power supply
  8. Jumper wires
  9. Breadboard
  10. Multiplier

Two input AND Gate using Transistor

We are going to use the BC547 transistor in common-emitter mode as shown in the picture. Here you can see two transistors are connected in series. Here we will use the base of these two-transistor as input. We can use one of the emitters out of two as output.


logic transistor and gate

At first, when two switches are in OFF mode there is no power supply to both the bases. Now base to emitter voltage and base to collector junction voltage of both these transistors is lower than 6.05 volt and it is equal to the practical threshold voltage of the diode.

Here both transistors act like an open switch because base to emitter junction and base to collector junction is in reverse bias so both the transistors go into their cutoff state. The current coming through resistor R3 is blocked by the transistor so we get a low voltage. As a result of the low voltage, we get the LED in OFF mode.


logic transistor and gate 2

Now if we press switch 1 then the base of the first transistor gets connected to the power supply. So the base of the first transistor gets some voltage and the base of the second transistor is still in cutoff mode. The emitter of the first transistor is connected with the collector of the second translator, as a result of this the emitter of the first transistor is not able to get any voltage as the second transistor is already in cutoff mode. So the base to emitter and base to collector junction voltage will be lower than the threshold voltage and both the transistors will be in cutoff state. All the current will be blocked by the transistor. As a result, we will get a low voltage in the output which will turn off the led.


logic transistor and gate 3

When we press both the switch then base to emitter junction and base to collector junction has a voltage higher than the threshold voltage so both the junctions now are in forward bias. Now it shows that both the transistors are in saturation state and act like a short circuit. So the current will flow from the collector of the emitter of the second transistor. Which will produce a high voltage in the output and will turn ON the led.

In this way, we can build our AND get using transistors. If both the inputs have a high value then we get a high value in the output otherwise we will get low all the time.


We can build  AND gates using CMOS also. In this case, we use CMOS NAND Gate. We will add an extra stage of transistors to invert the output signal of CMOS NAND Gate and which will work as an AND Gate.

cmos and gate

The above picture is an example of CMOS NAND Gate.  Transistor Q1 and Q3 are connected with input A. When the input A is high then the transistor Q1 is turning off and Q2 Is turning on. When input  A is low then Q1 is turning ON and Q2 is turning off.Q2 and Q4 are similarly controlled by input B for the same level of input logic.

Here you can clearly see that Q1 and Q2  have their source and drain terminal parallel while for Q3 and Q4 it is connected in series. Which means that the output will go high when one of the transistors saturates and will go low when all the transistor saturates.

Now if we add  an extra stage of transistors to invert the output signal then the same gate will work as a AND gate which we called  CMOS AND Gate.

cmos and gate2

3 input AND Gate

Let us consider there is an AND gate with its inputs A, B, C . If the output of that AND gate is D. Then we can say D=A.B.C

The truth table of this 3 input AND gate will be

3 input and gate

Here you can see the outputs Y and D are high(1) only when all the inputs are in high mode(1).

Michal Pukala
Electronics and Telecommunications engineer with Electro-energetics Master degree graduation. Lightning designer experienced engineer. Currently working in IT industry.