Basics of Digital Electronics Part 2

 Logic Gates

            As you learnt in the 1st Part that transistors are made from semiconductors. Both PNP and NPN transistors can be used as switch. Now I am going to explain how these transistors are used to make logic gates.

           Look in the image shown below. In this image the circuit contains two switches A and B. The output Y will be equal to the voltage drop across the resistance R which is equal to IR according to Ohm's law.The operation of the circuit can be divided into four parts.





fig 1.


1. When both the switches are open: In this part no current will flow through the resistance R and the voltage drop across the R will be Zero. Therefore the output will be Zero.As shown in the fig 1.


2. When A is closed and B is open: Like in the previous case  current will not flow and output will be Zero.


3. When A is open and B is closed: Output will be Zero because A is open and circuit is not complete.


4. When both A and B are closed: In this part the circuit is complete and current I will flow through the resistance R which will result in voltage drop across the R and the output will be equal to 5 volt.


                                      Switch A                    Switch B               Output

                             
                                         off                               off                         0 V
                                         on                               off                         0 V
                                         off                               on                         0 V
                                         on                               on                         5 V


         Now look in fig. 2. Switches are replaced with transistors. As we know that transistor can act as a switch. It is closed when base is triggered and open when triggering is removed from the base or it is connected to 0 volt.






fig 2.

           Now both the transistor bases are connected to Zero volt. Therefore no current will flow and output will be Zero volt. When one of the transistor base is connected to 5 volt and another is connected to 0 volt then output will be Zero because one transistor will act like an open switch and circuit will not be completed and due to this current will not flow and output will be Zero.

      
          When both the transistors are triggered by connecting their bases to 5 volt then both will behave like closed switches and current I will flow through the resistance R which will result in voltage drop across the R which can be given by the relation V=IR.


                                    A                        B                      Output Y

                             
                                    0 V                     0 V                     0 V
                                    5 V                     0 V                     0 V
                                    0 V                     5 V                     0 V
                                    5 V                     5 V                     5 V

        Replace 0 V with 0 and 5 V with 1 in the above truth table then will look like this


                                  A                         B                          Y

                             
                                  0                          0                           0
                                  1                          0                           0
                                  0                          1                           0
                                  1                          1                           1
                              

             You can see that this is the truth table for AND gate and AND gate is made from the transistors. That logic family in which logic gates are made from transistors is known as Transistor-Transistor logic(TTL) family. In TTL bit 0 is represented by a voltage ranging from 0 v to 0.8 v and bit 1 is represented by voltage from 2.5 to 5 v.


             Similarly NOT gate is also made from transistors. Fig 3 shows the circuit for a NOT gate using a switch.


                                                                          fig  3.

              In the image when switch is open then output is maximum which is equal to the applied voltage. This is because voltage drop across an open switch is equal to the applied voltage. When switch is closed then it acts like a short circuit with 0 resistance and voltage drop across this closed switch becomes Zero(IR=0). 
             If this switch is replaced with a transistor then output will be 0 v when base of the transistor is triggered with 5 v . The output will be 5 v when base is connected to 0 v.

                                                      Input                 Output
                                  
                                                        5 v                     0 v
                                                        0 v                     5 v 

                                                                   or
    
                                                      Input              Output

                                                        1                      0
                                                        0                      1

                                      Similarly OR gate can be made using the transistors.

fig 4.



             
                   If logic gates are made from complementary MOSFETs(Metal oxide semiconductor field effect transistors) then this family is known as CMOS family or technology. C MOSFET is a combination of P channel MOSFET and N channel MOSFET.
In this family bit 0 is represented by a voltage from 0 to 0.8 volt and bit 1 by a voltage from 2.5  v to 3.5 v. The benefit of  CMOS technology is that power consumption is very low. 




                                          



Comments

Popular Posts