LOGIC CIRCUITS AND DESIGN
Module 1- Logic Gates
      By: Engr. Irene F. Salvador, MSME
Logic Circuits and Devices
Module 1: Logic Gates
            TOPIC                                                        PRE
            OUTLINE                                                      ASSESSMENT
 A. Basic Logic Gates                                       Answer the following questions.
 B. Universal Logic Gates
                                                             1. What is the largest binary number that can be
 C. Exclusive Logic Gates                                       expressed with 16 bits?
                                                             2. What are the equivalent decimal and hexadecimal
            LEARNING                                            numbers of your answer in no. 1?
            OBJECTIVES                                                                ,
At the end of this module, you should be able to:            3. Obtain the 1’s and 2’s complements of the
                                                                following binary numbers:
 1. Learn the different types of logic gates.                    (a) 00010000
 2. Understand the functions of each Logic gates in dig-         (b) 00000000
    ital design.                                                  (c) 11011010
 3. Derive the equation from a circuit diagram.
 4. Use the logic gate in a working mechanism/circuit,                   LOGIC
                                                                         GATES
            OVERVIEW                                        A logic gate is a building block of a digital circuit. Most
                                                            logic gates have two inputs and one output and are
                                                            based on Boolean algebra. At any given moment, every
Computers have become as the basic need in our              terminal is in one of the two binary conditions false
day-to-day life. Computers are basically used to            (high) or true (low). False represents 0, and true
perform multitude of tasks, operations, and                 represents 1. Depending on the type of logic gate being
computations within quite less amount of time. One of       used and the combination of inputs, the binary output
the significant functions of the CPU in a computer is to     will differ.[2]
perform a logical operation which is done by utilizing
                                                            A logic gate can be thought of like a light switch,
some hardware, including electronic kits, chips and
                                                            wherein one position the output is off—0, and in
integrated circuits and software (programming)
                                                            another, it is on—1. Logic gates are commonly used in
technologies. But, how these hardware and software
                                                            integrated circuits (IC). Digital systems are said to be
interact and perform all these operations is quite a big
                                                            constructed by using logic gates. These gates are the
puzzle.
                                                            AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates.
In order to have a better understanding of such a           The basic operations are described below with the aid
complex issue, we must have to acquaint with the term       of truth tables.
Boolean Logic, developed by George Boole. We are
aware of the fact that computers utilize binary digits
instead of decimal digits for ease of operation. All the
logical operations are carried out by the logic gates.[1]
                                                                             Figure 1: Block Diagram
                                                                                 Module 1: Logic Gates | Page 1 of 6
Logic Circuits and Devices
Module 1: Logic Gates
                                                               inverted output is known as NOT A as shown in Figure
             BASIC LOGIC                                       4. This is also shown as A’, or A with a bar over the top,
             GATES                                             as shown at the outputs.
AND GATE
                                                                            IMPLEMENTATION OF
                                                                            BASIC LOGIC GATES
                                                               The implementation of the basic logic gate is to make a
                                                               simple circuit interconnecting the And, Or and NOT gate
                                                               with the input variables A,B and C. The output equation
                                                               was formulated from the flow of the circuit as shown in
                                                               figure 5.0. As the input variables A and B goes into the
                    Figure 2: AND Gate                         And gate, the operation of multiplying A and B will be
                                                               performed, then the output of And gate will now be A.B
                                                               or just AB. Then on the next logic gate which is the OR
The AND gate is an electronic circuit that gives a high        gate, the inputs will be the output of of the And gate
output (1) only if all its inputs are high (1),otherwise the   (AB) and the other variable which is C will pass through
output is low (0) as you could see in the function table.      not gate so it will be inverted as C’. These two inputs
A dot (.) is used to show the AND operation (i.e. A.B).        will go through the OR gate and the operation of
Bear in mind that this dot is sometimes omitted i.e. AB        addition will be performed having now the output of
as shown in Figure 2.                                          (AB + C 0 ). The output of the Or gate will now be an
                                                               input to the next AND gate in the circuit together with
                                                               the variable C, but this time, the variable C did not pass
OR GATE                                                        through Not gate. So these inputs(AB + C 0 ) and C will
                                                               be multiplied as it goes through the last And gate, then
                                                               the final output og the circuit will be (AB + C 0 )C.
                    Figure 3: OR Gate
The OR gate in figure 3.0 is an electronic circuit that
gives a high output (1) if one or more of its inputs are                  Figure 5: Basic Logic Gate Circuit
high. A plus (+) is used to show the OR operation.
                                                                            UNIVERSAL
NOT GATE                                                                    LOGIC GATES
                                                               The NAND and NOR gates are the universal gates. Each
                                                               of this gates can realize the logic circuits single
                                                               handedly. The NAND and NOR are also called as
                                                               universal building blocks. Both NAND and NOR has the
                                                               ability to perform three basic logic functions such as
                    Figure 4: NOT Gate                         AND,OR and NOT. NAND gate is a combination of an
                                                               AND gate and a NOT gate. The expression for the
                                                               NAND gate is ‘—‘whole bar. The output of the NAND
The NOT gate is an electronic circuit that produces an         gate is at logic 0 level only when each of the inputs
inverted version of the input at its output. It is also        assumes a logic 1 level. The truth table of two-input
known as an inverter. If the input variable is A, the          NAND gate is given below:
                                                                                    Module 1: Logic Gates | Page 2 of 6
Logic Circuits and Devices
Module 1: Logic Gates
NAND GATE                                                     input for Nor gate, together with the input C. These
                                                              inputs now will go through the Nor gate, it will be added
                                                              first and then inverted, so the output equation of the
                                                              circuit will be ((AB)0 + C)0 .
                  Figure 6: NAND Gate
                                                                          Figure 8: NAND and NOR Circuit
The NAND gate in figure 6 is the same as AND gate
with NOT gate connected at the output. The circle at
the output of the NAND gate is called bubble, an                           EXCLUSIVE
inverter absorbed by the And gate. The equation at the                     LOGIC GATES
output (AB)0 means that the inputs A and B are
multipled first, that is why it is enclosed with a
                                                              XOR GATE (Exclusive OR)
parenthesis and the product then will now be inverted
as signified by the (prime- ’) after the (AB).
NAND GATE
                                                                                 Figure 9: XOR Gate
                                                              The function of exclusive OR gate, as shown in figure 9
                                                              that if the inputs are not the same or the other input is
                                                              high (1) and the other input is low (0), the output is high
                   Figure 7: NOR Gate                         (1), otherwise the output is low (0). It uses an operator
                                                              symbol ⊕, so the output equation will be A ⊕ B.The
                                                              other way to express the equation for XOR gate is
The NOR gate in figure 7 is also the same as OR gate           (A0 B + AB 0 ).
with NOT gate connected at the output. The inputs A
and B will be added first before it will be inverted as
shown in the output equation (A + B)0 . On the function       XNOR GATE (Exclusive NOR)
table, if the inputs A and B are both low (0), so when
(A = 0) + (B = 0), the sum will be 0 and will be inverted
to 1. If one of the input is high (1) the sum will be 1 and
will be inverted to 0.
             IMPLEMENTATION OF
             UNIVERSAL LOGIC GATES
                                                                                Figure 10: XNOR Gate
The illustration of the interconnected NAND and NOR
gate in figure 8 shows that the inputs A and B will pass       The symbol for XNOR gate, as illustrated in figure ?? is
through NAND gate and will have an output of A                just like XOR gate but with a bubble on the output which
multiplied to B, then inverted using a (’). The output        means that, outputs are inverted. The function of XNOR
equation,(AB)0 of NAND gate will now be one of the            is totally the reverse of XOR wherein the output will be
                                                                                   Module 1: Logic Gates | Page 3 of 6
Logic Circuits and Devices
Module 1: Logic Gates
high (1), if both inputs A and B are the same high (1) or                2. The Inverter is also called
the same low (0). The output equation for XNOR can be
given in many forms other than the output equation in                           a) Not Gate                       b) And Gate
figure ??                                                                        c) Or GAte                        d) Xor Gate
                             ¯ B)
                          (A ⊕                          (1)
                                                                         3. The NOR gate is OR gate followed by
or
                                                                            ..................
                                 (A ⊕ B)0                         (2)
or                                                                              a) And Gate                       b) Nand Gate
                                            0   0
                              (AB + A B )                         (3)           c) Not GAte                       d) None of the above
                                                                         4. The only function of NOT gate is to . . . . . . . . . . . . . . . ..
                 IMPLEMENTATION OF                                              a) Stop signal                    b) Invert input signal
                 EXCLUSIVE GATES                                                c) Act as universal               d) Amplify the signal
                                                                                   gate                              on the output
The circuit in figure 11, shows two xor gates connected
as inputs for the Xnor. The inputs for the first Xor gate                 5. When an input signal 1 is applied to a NOT gate, the
are A and B with an output equation of (A ⊕ B) while                        output is . . . . . . . . . . . . . . . . . .
the second Xor gate has B and C as its inputs with an                           a) 0                              b) 1
output equation of (B ⊕ C) . The output equation of
both Xor will now be the input for the Xnor, so the final                        c) Either 0 and 1                 d) nothing happens to
output equation of the circuit is                                                                                    the signal
                                                                         6. The output will be a LOW for any case when one or
                                  ¯ (B ⊕ C)
                          (A ⊕ B) ⊕                               (4)       more inputs are zero in a/an . . . . . . . . . . . .
                                                                                a) Or gate                        b) Not Gate
or it could be presented as the equation in the figure
below. The small bar over the operator of Eqn.(4) is the                        c) And Gate                       d) Nand Gate
same as the long bar over the equation in figure 11.
                                                                         7. The logic gate that will have HIGH or “1” at its
                                                                            output when any one of its inputs is HIGH is a/an
                                                                            . . . . . . . . . . . . . . . gate.
                                                                                a) Or Gate                        b) Not Gate
                                                                                c) And Gate                       d) Nand Gate
                                                                         8. A NAND gate has . . . . . . .. inputs and . . . . . . . output.
                                                                                a) LOW inputs and                 b) HIGH inputs and
                                                                                   LOW outputs                       HIGH outputs
                Figure 11: XNOR and XOR Circuit                                 c) LOW inputs and                 d) None of these
                                                                                   HIGH outputs
                                                                         9. The basic logic gate whose output is the
                                                                            complement of the input is . . . . . . . . . . . . .
                 ACTIVITY
                                                                                a) Or Gate                        b) And Gate
A. Multiple Choice Questions: Choose the correct                                c) Not Gate                       d) Nor Gate
answer.
                                                                        10. . . . . . . . . . . .. input values will cause an AND logic
                                                                            gate to produce a HIGH output.
 1. The universal gate is . . . . . . . . . . . . . . . . . .
                                                                                a) At least one input is          b) At least one input is
        a) Nand Gate                            b) Or Gate                         HIGH                              LOW
        c) And Gate                             d) None of the Above            c) All inputs are HIGH            d) All inputs are LOW
                                                                                                  Module 1: Logic Gates | Page 4 of 6
Logic Circuits and Devices
Module 1: Logic Gates
11. The logic gate that will have HIGH or “1” at its
    output when any one of its inputs is HIGH is a(n):
         a) Or Gate                 b) And Gate
         c) Nor Gate                d) Not Gate
12. What input values will cause an AND logic gate to
    produce a HIGH output?                                         C.
         a) All inputs are LOW.     b) At least one input is
                                       HIGH.
         c) At least one input is   d) All inputs are HIGH.
            LOW.
13. The output will be a LOW for any case when one or
    more inputs are zero in a(n):
                                                                            SUMMARY
         a) Or Gate                 b) Not Gate
         c) And Gate                d) Nand Gate               The Logic gates consists the basic gates, the universal
                                                               gates, and the exclusive gates.. The basic logic gates
14. The boolean expression of an OR gate is                    are And, Or and N ot. The And Gate will only have a
                                                               high ouput (1), only if both inputs are high (1), otherwise
         a) A.B                     b) A0 B + AB 0
                                                               the output is low (0). The Or Gate will only have a low
         c) A + B                   d) A0 B 0                  output (0), only if both inputs are low (0), otherwise the
                                                               output is high (1). The N ot Gate, also called the
15. The expression of an XOR gate is                           inverter will give a high (1) output if the input is low (0)
                                                               but if the input is high (1), the output will be low (0).
         a) A0 B + AB 0             b) AB + A0 B 0
                                                               The Universal gates are N and and N or, where the
         c) A + A.B                 d) A0 + B 0                N and is an And gate with N ot gate on the output, that is
                                                               why there is a bubble on the output of the N and Gate.
                                                               The N or Gate is also an Or gate with a N ot Gate on the
B. Write the output expression of the following circuit        output. Both these gates functioned as the reverse of
diagrams.                                                      the And gate for N and and Or gate for N or.
                                                               The Exclusive gates are XOr and XN or gates where
                                                               XOr is also called exclusive-OR and XN or is an
                                                               exclusive-NOR. These two exclusive gates functions as
                                                               the reverse of each other. The XOr will just have a high
                                                               output (1), if both inputs are unequal, but if the inputs
                                                               are equal, the output will be low (0). The XN or will only
                                                               have a high output (1), if both inputs are equal, but if
                                                               inputs are unequal, then output will be low (0).
    A.                                                         The implementation of these gates will only be tested
                                                               or simulated when applying an input signal and an
                                                               output component to identify if it is high or low. The
                                                               ouput equation or expression will be determined from
                                                               the circuit flow. If inputs passes through AN D gate, the
                                                               operator used will be a dot (.) for multiplication, when
                                                               passed through OR gate, the operator used will be plus
                                                               (+), for addition and when an input goes through N OT
                                                               gate, the input will be inverted having a bar (-) over the
                                                               variable or expression or a prime (’) signifying that the
    B.                                                         input was inverted.
                                                                                     Module 1: Logic Gates | Page 5 of 6
Logic Circuits and Devices
Module 1: Logic Gates
            REFERENCES
[1] Mano, Morris and Michael D. Ciletti Digital De-
   sign, 5th edition. Pearson Education, Inc. New Jersey,
   USA.(2013)
[2] https://www.circuitstoday.com/logic-gates
[3] https://www.tutorialspoint.com/computer-logical-
   organization/logic-gates.htm
[4] https://www.elprocus.com/basic-logic-gates-with-
   truth-tables
Prepared by:
ENGR. IRENE F. SALVADOR, CPE, MSME
Faculty, Computer Engineering Department
College of Engineering and Architecture
                                                            Module 1: Logic Gates | Page 6 of 6