What are Logic gate?

Logic gate are the basic building block of digital computers. Gates, actually are circuits which takes Some input usually (2 or more) to produce a single output. Gates have upon no memory and their output depends the present value of input. The logic gate are used to make combinational circuit (like Half adder, Full adder, half Subtractor, Full subtractor, Multiplexer, Demultiplexer, Decoder, Encoder And Magnitude comparator etc.) , Sequential circuit( like Flip flop, Latch, counters etc.), PLA(programmable Logic Array), PAL(programmable array logic). There are seven types of gates out of which three are basic gates and four are derived gates.

What are basic logic gate?

The basic building block of a digital computer are known as Basic logic gate. There are three kinds of basic gates or just gate i.e. AND-gate, OR-gate and NOT-gate(or inverters) which are discuss below:

OR gate

This is a basic gate that takes two input and produces high output when any one of the input is high. OR gate produces low result when all inputs are Low. The OR gate is symbolized by ‘+’ sign between the variable. If A and B are two inputs and X is the output, then OR gate is given by X=A+B.

symbol of OR gate
Symbol of OR gate
ABX=A+B
0
0
1
1
0
1
0
1
0
1
1
1
Truth table of OR-gate
AND gate

It is а basic gate that produces a high output when all inputs are high, and if any input are low, it produces a low output. AND gate is symbolize by (.) sign between the variables. If A and B are two input variables and X is the output variable then AND gate given by X=A.B

Symbol of AND gates
Symbol of AND gate
ABX=A.B
0
0
1
1
0
1
0
1
0
0
0
1
Truth table of AND-gate
NOT gate

is an inverter gate. It just complements the input. It take only one input and if the input is high it produces low and vice-versa which are shown in truth table below:

Symbol of NOT gate
Symbol of NOT gate
AA’
0
1
1
0
Truth table of NOT-gate
NOR gate:

is an inverter of OR gate. It produce a low output when any of the input is high and produces a high output when all inputs are low which are shown in truth table. It is also called universal logic gate.

Symbol of NOR gate
Symbol of NOR gate
ABX=(A+B)’
0
0
1
1
0
1
0
1
1
0
0
0
Truth table of NOR-gate
NAND gate

NAND gate is an inverter of AND gate. It produces high output when any one of the input is low. It produces low output, when all inputs are high.

logic Symbol of NAND gate
Symbol of NAND gate
ABX=(A.B)’
0
0
1
1
0
1
0
1
1
1
1
0
Truth table of NAND-gate
X-OR gate:
Exclusive OR is derived gate that is symbolized by +. It produces a high output only when both the inputs are of opposite logic. If both are of same logic at produces a low output.
Symbol of X-OR gates
Symbol of X-OR gate
ABX=A’B+AB’
0
0
1
1
0
1
0
1
0
1
1
0
Truth table of XOR-gate
X-NOR gate
Exclusive NOR gate is a derived gate that is symbolized by . The X-NOR gate produces output only when both the inputs, are of same logic. if the inputs are different logic it produces low output.
Symbol of X-NOR gates
Symbol of X-NOR gate
ABX=(A’B+AB’)’
0
0
1
1
0
1
0
1
1
0
0
1
Truth table of XOR-gate

What is Universal gate?

The universal gate is a gate which can implement any Boolean Function without need to use any kind of other gate. NOR gate and NAND gate are also known as universal gate because we can implement the basic gate OR, AND, NOT gate From these two gates.

Why are NAND and NOR gate is called universal logic gate?

To prove these two gate are universal gate, That any Boolean function can be implemented using NAND and NOR gates we will show that the AND, OR and NOT operation can be perform using only these gate.

1.NAND gate is an universal logic gate:
NAND gate is universal gates
Implementing AND using only NAND GATES
ABA’B’(A’.B’)’
0
0
1
1
0
1
0
1
1
1
0
0
1
0
1
0
0
0
0
1
Truth table NAND gate as AND gate

Above the truth table show that when two input A and B are attached between two NAND gate we found the same output as AND gate. So AND gate can be replaced by NAND gates as shown in the figure (The AND is replaced by a NAND gate inverter).

why  NAND GATE is universal gate
Implementing NOT gate using only NAND GATE
AA(A.A)’
0
1
0
1
1
0
Truth table NAND gate as NOT gate

All NAND inputs pin connect to the input signal A gives an output A’.

NAND gate as a universal gate
Implementing OR-gate using only NAND gate
ABA’B’(A’.B’)’
0
0
1
1
0
1
0
1
1
1
0
0
1
0
1
0
0
1
1
1
Truth table NAND gate as OR gate

An OR gate is replaced by NAND gate as shown in above the logic symbol or truth table (Here we replace OR gate by NAND gate with all its input complemented by NAND gate inverters.

Thus, the NAND gate is a universal logic gate since it can be implemented the AND, OR and NOT function.

2.NOR gate is an universal gate:
NOR is a universal gate
fig: illustration OR-gate using only NOR gates
AB(A+B)’(A+B)”
0
0
1
1
0
1
0
1
1
0
0
0
0
1
1
1
Truth table NOR gate as OR gate

If we apply two inputs A and B between two NOR gates then the output is same as OR gates which are shown above the truth table. Above the symbol show that the OR gates are replace by NOR gate.

how we can implement NOR as universal gates
illustration NOT-gate using only NOR gates
AAA’
0
1
0
1
1
0
Truth table NOR gate as NOT gate

All NOR inputs pins connect input signal A gives an output (A+A)’ =A’. As this way NOR gate can be used as NOT gate(inverter).

NOR is a universal gate
illustration AND-gate using only NOR gate
ABA’B’(A’+B’)’
0
0
1
1
0
1
0
1
1
1
0
0
1
0
1
0
0
0
0
1
Truth table NOR gate as AND gate

When two NOR gate output combine single NOR gate, then we can obtain AND gate.

Thus, the NOR gate is a universal logic gate since it can be implemented the AND, OR and NOT logic gate.

Leave a Comment

Your email address will not be published. Required fields are marked *