1. Introduction
Logic gates are the basic components in digital electronics. These gates are used to create digital
circuits right from simple to complex logic circuit and even complex integrated circuits. Complex
microprocessor or microcontroller ICs are constructed using many logic gates.
Logic gates are the fundamental building blocks of all digital systems. It has one or more inputs
and one output with some logical relationship between them. Logic gate accepts binary signals
i.e. True or False, ON or OFF, 1 or 0 and have an ability to make decisions. The state of the output
is decided by the input states. All logic gates implements some Boolean function which correlates
output with input through some logical operation. Logic gates are mainly designed with the
electronic switches using diodes and transistors.
There are three basic gates – AND, OR and NOT. NAND and NOR gates are derived gates are
also known as universal logic gates. An XOR gate is inequality detector gate and can be used in
comparator, adders, parity generators etc. The symbols of logic gates are of two types – Distinctive
shapes & rectangular shapes.
In this module, the logical operation, characteristics, switch analogy and truth tables of different
logic gates are discussed. The original ANSI/IEEE distinctive shape symbols and new ANSI/IEEE
standard outline symbols of logic gates are prominently introduced. Logic gates are commercially
available in two basic logic families, such as IC 74XX series for TTL (Transistor Transistor Logic)
and IC 40XX/45XX for CMOS (Complementary Metal Oxide Semiconductor) series. These all
logic gates packaged as Small Scale Integration (SSI) ICs.
2. Logic Gates
Digital systems are constructed using logic gates. The logic gate is the most basic building block
of any digital system capable of making decision including computers. Each one of the basic logic
gates is a piece of hardware or an electronic circuit that can be used to implement some basic logic
expression. It is an electronic circuit with one or many inputs and only one output.
With the help of logic gates it is possible to implement the most elementary logic expressions, also
known as Boolean expressions. . The three basic logic gates are the OR gate, the AND gate and
the NOT gate. Most logic gates have two inputs and one output.
At any given instance, every input or output terminal is in one of the two logic conditions
True or False which describes Logic value,
1 or 0 provides binary value,
+5V (+3.3V for new devices) or 0V provides voltage levels,
High or Low describes the voltage levels and
Digital Electronics
Electronic Science
5. Logic gates
, 3
ON or OFF describes the switch position.
The common use of logic gate is to act as switches (although they have no moving parts). Gate
opens to pass on logic or close to shut to keep it off. This is why they are known as gates. Gates
are classified as primary gates (NOT, AND, OR) and Secondary or derived gates (NAND, NOR –
Universal gates and XOR, XNOR - combinational gates). Let us now discuss these gates one by
one.
2.1 NOT gate:
NOT gate has one-input and one-output. It is a logic circuit whose output is always the
complement of the input. Fig. 1 indicates the logic symbol and truth table of NOT gate along with
simple implementation using switches. The NOT gate is popularly known as inverter. It performs
logical inversion or complementation.
That is, if A is the input to a NOT circuit, then its output Y is given by Y = or A’. That is, a
LOW input produces a HIGH output and vice versa.
(a) (b)
(c)
Figure 1: NOT gate (a) Logic Symbol (b) Switch implementation (c) Truth table.
The purpose of inverter is to change one logic level to opposite level. The LOW level at input
produces a HIGH level and vice versa. In terms of bits, it changes a 0 to a 1 and a 1 to 0.
Let us now consider an electronic circuit consisting of Battery, Resistor, Switch and Lamp to
implement simple NOT gate or inverter. When switch is open (logic ‘0’) then lamp is ‘on’ (logic
‘1’) and when switch is closed (logic ‘1’) then lamp is ‘off’(logic ‘0’).
Digital Electronics
Electronic Science
5. Logic gates
, 4
2.2 AND gate :
AND gate is a logic circuit having two or more inputs and one output. The AND gate performs
logical multiplication i.e. AND function. Fig.2 indicates the logic symbol and truth table of two
input AND gate along with simple implementation using switches.
The output of an AND gate is HIGH only when all of its inputs are in the HIGH state. In all other
cases, the output is LOW. For AND gate, Y = A.B
The logical operation of AND gate can be expressed with the help of a table which includes all
input combinations and corresponding outputs. Such table of input / output relations is known as
truth table. In this case, there are 2 inputs to AND gates to provide 2 2 = 4 input combinations in
the truth table. The truth table may be extended to any number of inputs. For 3 inputs, there are 8
combinations and 16 for 4 inputs.
(a) (b)
(c)
Figure 2: AND gate (a) Logic Symbol (b) Switch implementation (c) Truth table.
AND gate can be implemented using switches. Let us now consider an electronic circuit consisting
of Battery, Resistor, Switches and Lamp to explain the AND function. If both switches are closed
(logic ‘1’) then only lamp is ON (logic ‘1’). If any one or both switches are
Digital Electronics
Electronic Science
5. Logic gates