5                                          logic Gates
5.1   Introduction
                                                                 binary operators, AND
      Eoolean algebra, as defined in previous chapter, has two these operators, we
                                                                 of
      ar:d OR, and one unary operator NOT. From the definition electronic circuit which
      have defined other binary operators in term of them.(An            electronic circuit
      penormsa logic operations in called a logic gate. For example, the
       whichperforms AND operation is called AND gate, which performs OR operationon.is
      Cilled OR gate, which performs NOT operations is known as NOT gate and so
      Aknowledge of logic gates is essential to understand the important digital circuit
      use:d in computers.
      Cha ac!eristics of Logic gates are :
      :        Each logic gate has only one binary output.
      L2       Each logicgate has either one or more than one binary input(s).
  .2 Basic               [es
          These are th:e basic gates, namely, AND, OR and NOT. Let us consider these
          gates one by    e.
 5        AND Gate
          An AND gate has ivo or more inputs and only one output. The output of an AND
          qate is 1 only if al     uts are 1. The standard symbol for an AND gate with two
          inputs is shown in fig. 5.1
                                 A
                                                                   -F
                                 B
                                             FIGURE 5.1
                                                                                       [ 931
   The logiC or boolean expression tor a two input AND gate, with inputs A,D           d
   output F is wntten as
                                          F= A.B
   The Truth table for two input AND gate is
                                             shown in table 5.1
                                      TABLE 5.1
                          A               B             F
                           1              1              1
    An AND gate with four inputs is given in fig 5.2
                                                       F=A.B.C.D
                          D
                                         FIGURE 5.2
5,2.2 OR Gate
    An OR gate has two or more inputs and only one output. The output of an OR gate
    is 1.only if one or more inputs are 1.The standard symbols for an OR gate with two
    inputs is shown in fig 5.3
                               A
                                                             F
                               B
                                         FIGURE 5.3
    The logic or boolean expressionfor a two inpuOR gate, with inputs A,B did uutput
    F is written as
                                         F=A+ B
                                                                                 [99 )
    LIHe truth table tortwoinput OR gate is shown in Table 5.2
                                          TABLE 5.2
                           A                   B              F
                                                             0
                                                1             1
                            1
                            1                   1             1
      AnCR gate with four inputs is given in fig 5.4
                                                            -F=A+B+C+D
                                               FIGURE 5.4
5.2.3 NOT Gate
     1. NOT gate has one input and one output. it is also known as inverter. The standard
     Snbols for NOT gate is shown in fig 5.5
                                           F            A
                                {4)                               (B)
                                          FIGURE 5.5
      The logic expressionof a NOT gate is
                                            F=A
       The truth table for NOT gate with input Aand output F is shown in table 5.3
                                          TÁBLE 5.3
                                      A                 F
                                                                                     [100]
Example 1
Design a circuit to realize the Boolean functions
z= (X +y)(* +ù)
                                           (xv)
                                   FIGURE 5.6
 Example 2
 Design a circuit to realize the Boolean functions
 Y= ABC+ ABC + ABC
                                                  ABC
                                                   ABC
                                                    ABC
                                     FIGURE 5.7
   Universal Gates
   We can implement all boolean expression with basic logic gates. Stil. we iry to
   constuct other logic gates with the help of basic logic gates for practical r'orest.
   While constructing other logic gates, we always consider the following faicrs.
   (a) Feasibility and economy of producing the gate which physica conponents.
                                                                                  |101 ]
     (b) Possibility of extending the gate to more thantwo inputs.
     (c)    Properties of the binarv operator such as commutativity.
           Ability of the get to implement Boolean functions or expresslon alone or i
            conjuction with other çates.
           /A universal gateeis that gate which apart from its own logical function can also
             perform the basic gate functions i.e.AND, OR and NOT. NAND and NOR are
           universal gate.
            Let us consider NAND and NOR gates
 3.3.1 NAND gate
     When AND gate is combined with an inverter. a NAND gate is obtained. In other
     Words, the NAND gate is a combination of NOT and AND gate. Logic symbol for
     two-input NANDgate is shown in figure 5.8.
                                 A
                                                            -F
                                 B                                   AB
                                 FIGURE 5.8 [AND-INVERT)
     The Logic expression
                                         F=A.B
     The truths table for a NAND gate with two inputs A,B and one
     table 5.4                                                        outputFis shown in
                                        TABLE 5.4
     inut                    A              B
 lee3
Ta
                                                            F
  ALSo                                      0               1
                             0               1              1
                                                            1
                                            1
     Other logic symbol of NAND gate is shown in fig 5.9
                                 FIGURE 5.9 [OR-INVERT]
                                                                                     [102)
    Here F- AtB
             AB (By De Morgan's law)
sA2 NAND gate as an Universal Gate
    The logic oporations AND, ORand NOT can be implemented with NAND gate.
         (a) NOT function
                                          FIGURE 5.10
              Hence a single input NAND gate acts like an inverter.
          (b) AND function
                                           FIGURE 5.11
              Hence using two NANDgates, we could get the AND output.
          (c) OR function
                                                                                      3
                                                             }Y-(X+Y)
                                           FIGURE 5.12
                Hence using three NAND gates, we could get the OR output.
53.3 The NOR gate
     When an OR gate is combined with an inverter, a NOR gate is obtained. In othe:
     words NOR gate is combination of NOT and OR gate. Logic symbol for two inp.
      NOR gate is shown in figure 5.13
                                                                              1]
                                  A
                                                            -F
                                  B
                                      FIGURE 5.13 [OR-INVERT|
  The logic expression of it is
                                             F=A+ B
   The truth table for a NOR gate with two inputs A, Band one output Fis
  Table 5.5                                                                shown ir
                                        TABLE 5.5
Made                     A                                  F
                                             1
                          1
                                             1
  Other logic symbol of NOR gate is shown in figure 5.14
                              FIGURE 5.14 [INVERT-AND]
  Here F= A.B
          =A+B1
  NOR gate as an Üniversal Gate
  The basic operations AND, OR and NOT can be
                                              implemented with NOR gate.
       (a) NOT function
                                         X
                                                 -
                                             FIGURE 5.15
              Hence a single input NOR gate acts like an inverter
                                                                            [104
       (b)     OR functlon
                                             FIGURE 5.16
              Hence using two NOR gates, we could get the OR output
        (c)   AND function
                               D                                    X +y
                               -D
                                            FIGURE 5.17
               Hence using three NOR gates, we could get the OR output.
3.4Exclusive - OR (XOR) gate
    The ExclusiveQR operation is widely used in
                                                digital circuits. In this gate, If both
                                                       Logic symbol of XOR gate is
                                                         1.
    the inputs are same, output is 0 otherwise output is
    shown in figure 5.18
                           A
                                                           -F
                                         FIGURE 5.18
    The logic expression of it is
                                        F= AB + AB
                                          =AOB
                                          inputs A,B and output F   is shownin Table 5.6
     The truth table for XORgate with two
                                                                                  [105]
                                            TABLE 5.6
                                               1.
                               1                               7
                               1
  5.5   Exclusive - NOR (XNOR) gate
        XNOR gate is also known as equivalence gate. It is the combination of XOR and
        NOT gate, The logic symbol for XNOR is shown in figure 5.19
                                   A
                                                                  -F
                                   B
                                             FIGURE 5.19
        The logic expressionof it is
                                            F=(AB+ AB)
                                             -AB+AB           (A6)
                                             =AoB
        The truth table for XNOR gate with two inputs A, Band one output F is
        Table 5.7
                                                                              shown in
                                          TABLE 5.7
                              A               B               F
                              0                               1
                                               1
                              1               0
Doer                          1                               1
        Note that in this gate.If both inputs are same, output is 1otherwise output is 0.
                                                                                       [106)