This document provides an introduction to logic gates, which are basic building blocks of digital circuits that perform logical operations. It describes common logic gates like OR, AND, NOT, XOR, NOR, NAND and XNOR and presents their truth tables. Combinational logic circuits have outputs that depend only on current inputs, while sequential circuits have memory and outputs depend on current and previous inputs. Applications of logic gates include digital devices, control systems, communication and computing. Examples are provided for deriving outputs of logic circuits.
This document provides an introduction to logic gates, which are basic building blocks of digital circuits that perform logical operations. It describes common logic gates like OR, AND, NOT, XOR, NOR, NAND and XNOR and presents their truth tables. Combinational logic circuits have outputs that depend only on current inputs, while sequential circuits have memory and outputs depend on current and previous inputs. Applications of logic gates include digital devices, control systems, communication and computing. Examples are provided for deriving outputs of logic circuits.
• Electronic circuits capable of making logical decisions;
• Basic building blocks of digital systems design;
• Can have one or more input signals and an output
which is a logical combination of the inputs. • In computing systems, the symbols 0 and 1 indicate 2 possible states of a circuit or device. The following logic gates will be treated in this lesson: • OR; • AND; • NOT; • XOR; • NOR; • NAND and • XNOR • Logic gates operate based on a logical algebraic system known as Boolean algebra.
• In this system, the variables used can assume
only one of two values i.e. 0 and 1. OR Gate • Produces an output 1 when any or all of the inputs are 1. • It is therefore also called an any-or-all gate.
• The logical operation of a 2-input OR gate can be
summarized in the truth table below. Table 1: OR Truth Table • A practical example of the OR gate is shown in the figure below. • For the lamp to glow, either switch A or B or both are closed.
• The Boolean equation for the OR gate is:
A+B=C
• This operation is also applicable for an OR gate
with more than two inputs. AND Gate • Produces an output of 1 only when all inputs are present (i.e. 1). • It is also known as an all-or-nothing gate.
• The logical operation of a 2-input AND gate can be summarized in
the following truth table. Table 2: AND Truth Table • A practical example of the AND gate is shown in the figure below: • The lamp will be ON only when both switches A and B are CLOSED.
• The Boolean equation for this gate is
A x B = C or AB = C XOR Gate • The output is 1 only if both inputs are different.
• Excludes the case where both inputs are the
same.
• Also referred to as an inequality comparator
• The truth table for a 2-input XOR gate is given below Table 3: XOR Truth Table NOT Gate • It has one input and one output. The output is simply the complement of the input. • Also called an inverter • The logical symbol for inversion or complementation is Ā. • The truth table for a NOT gate is shown below: Table 4: NOT Truth Table Example • Considering the figure below, derive a logical expression for X and determine its value when A = 1, B = 0 and C = 1. Example • From the below diagram, find X when A and B are 1 and C = 0. • Determine the value of X when (a) A = 0, B = 1 (b) A = 1, B = 1 NOR Gate • Also called NOT-OR Gate • Made by connecting an inverter to the output of an OR gate. • Produces an output of TRUE when all inputs are FALSE.
• The truth table for a 2-input NOR gate is shown below:
Table 5: NOR Truth Table NAND Gate • It is actually a NOT-AND gate. • Made by connecting a NOT gate to the output of an AND gate. • Gives an output of 1 if both inputs are not 1.
• The truth table for a 2-input NAND gate is shown below
Table 6: NAND Truth Table XNOR Gate • Also referred to as a NOT-XOR Gate • Made by connecting a NOT gate to the output of an AND gate. • Gives an output of 1 if both inputs are the same.
• The truth table for a 2-input XNOR gate is shown below
Table 7: XNOR Truth Table Types of Logic Circuit Logic circuits are basically categorized into two types: • Combinational Logic Circuits
• Sequential Logic Circuits
Combinational Logic Circuits • Has input set, a memory-less logic network to operate on the inputs and a set of outputs.
• The output depends only on the present input values.
• Output does not depend on the previous state of the
circuit.
• Examples include multiplexers, demultiplexers, encoders,
etc. Combinational Logic Circuits Sequential Logic Circuits • Has input set, logic network, outputs and memory.
• Present output depends not only on the
present input states but also on the previous logic states of the outputs.
• Examples include latches and flip-flops.
Sequential Logic Circuits Sequential Logic Circuits (SLCs) are further classified as:
• Synchronous SLCs: They operate at a clocked rate, i.e. all the
outputs change at the same time, in step with each other (i.e. they are synchronized). This timing is usually provided by one edge of the clock signal.
• Asynchronous SLCs: Operate without clocking, i.e. the outputs
change at different times. Sequential Logic Circuit Applications of Logic Circuits • Design of more complex devices like binary counters
• Decision making in automatic control of machines and various
industrial processes
• Digital measuring techniques
• Digital processing of communication signals
• Calculators and computers
Example • An electrical signal is expressed as 10110011. Explain its meaning. If the signal is applied to a NOT Gate, what will be the output signal?
• Two electrical signals 1100111 and 1010101 are applied to a
2-input AND Gate. Give a sketch of the output signal.
• Two signals 11011 and 01001 are inclusive-OR combined. The
output is then exclusive-OR combined with a third signal 10111. Draw the complete logic circuit describing this scenario, and then give a sketch of the final output signal. • Given that A = 11011, B = 01101, C = 10100 and D = 00101, determine the output of the following logic circuit.