Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

Logic Gate

Discription

Uploaded by

jannatjoya466
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Logic Gate

Discription

Uploaded by

jannatjoya466
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

LOGIC GATES AND THE TRUTH TABLE :

Logic gates are used in many electronic devices, from computers to


communication systems. These devices perform operations by passing data through
logic gates which operate as electronic switchesand react in one of the two ways of
the binary code (0 or 1) to the data put into them.
A logic gateis an elementary building block of a digital circuit. Most logic gates
have two inputs and one output. The input and the output signals of a gate can be in
one of the two binary conditions:low (0 or “off”) or high (1 or “on”). The value of the
output depends on the values of its inputs.
Logic gates allow an electronic system to make a decision based on a number
on its inputs. They are digital electronic devices.
Logic gates use the principles of a mathematical system known as Boolean
algebra. As well as a standard Boolean expression, the input and output information
of any logic gate or circuit can be schemed into a standard table to give a visual
representation of the switching function of the system.
The table used to represent the Boolean expression of a logic gate function is
commonly called a TruthTable. A logic gate truth table shows each possible input
combination to the gate or circuit with the resultant output depending upon the
combination of these input(s).

There are three basic logic gates: AND, OR, NOT.

Logic gates can be broadly classified as-

Basic Logic Gates are the fundamental logic gates using which universal logic gates and other
logic gates are constructed.
They have the following properties-

 Basic logic gates are associative in nature.


 Basic logic gates are commutative in nature.

NOT GATE:
The simplest possible gate is called an “inverter” or a NOT gate. It has just one input
and the output is its opposite: if the input is high (1), the output is low (0) and
viceversa. This could be represented by a simple lighting circuit with a push-to-break
switch: if the switch is pressed then the lamp will turn off.
Truth table for a NOT gate
Read as inversion of A Q A
gives Q
0 1

1 0
AND GATE:
An ANDgate is a circuit with two inputs and an output which is set to one only if both
the inputs are 1. This means that it will give ahigh output only if all of the inputs are
high. For example, in a simple lighting circuit with two switches in series the lamp
will light only if both switches are pressed.

Truth table for an AND gate

Read as A AND B gives Q

A B Q
0 0 0
0 1 0
1 0 0
1 1 1

The timing diagram for AND Gate is as shown below-


OR gates:
An OR gate will give a high output if any of the inputs is high. For example, in a
simple lighting circuit with two switches in parallel the lamp will light if either switch
is pressed. The relationship between the inputs and the output can be captured in a
truth table. A and B represent the inputs and Q is the output.
Truth table for an OR gate

Read as A OR B gives Q.

A B Q

0 0 0

0 1 1
1 0 1
1 1 1

Timing Diagram-

The timing diagram for OR Gate is as shown below-

Universal Logic Gates-


Universal logic gates are the logic gates that are capable of implementing any Boolean function
without requiring any other type of gate

They are called as “Universal Gates” because-


They can realize all the binary operations.
All the basic logic gates can be derived from them.

They have the following properties-


 Universal gates are not associative in nature.
 Universal gates are commutative in nature.

There are following two universal logic gates-

NAND Gate
NOR Gate

1. NAND Gate-

A NAND Gate is constructed by connecting a NOT Gate at the output terminal of the AND
Gate.
The output of NAND gate is high (‘1’) if at least one of its inputs is low (‘0’).
The output of NAND gate is low (‘0’) if all of its inputs are high (‘1’).

Logic Symbol-

The logic symbol for NAND Gate is as shown below-

Truth Table-

The truth table for NAND Gate is as shown below-


A B Y = (A.B)’
0 0 1
0 1 1
1 0 1
1 1 0

Timing Diagram-

The timing diagram for NAND Gate is as shown below-

2. NOR Gate-

A NOR Gate is constructed by connecting a NOT Gate at the output terminal of the OR Gate.
The output of OR gate is high (‘1’) if all of its inputs are low (‘0’).
The output of OR gate is low (‘0’) if any of its inputs is high (‘1’).

Logic Symbol-

The logic symbol for NOR Gate is as shown below-

Truth Table-
The truth table for NOR Gate is as shown below-

A B Y=A+B
0 0 1
0 1 0
1 0 0
1 1 0

Timing Diagram-

The timing diagram for NOR Gate is as shown below-

Special Gates:
Ex-OR & Ex-NOR gates are called as special gates. Because, these two gates are special cases
of OR & NOR gates.

Ex-OR gate
The full form of Ex-OR gate is Exclusive-OR gate. Its function is same as that of OR gate except
for some cases, when the inputs having even number of ones.
The following table shows the truth table of 2-input Ex-OR gate.

A B Y = A⊕B

0 0 0

0 1 1

1 0 1

1 1 0

Here A, B are the inputs and Y is the output of two input Ex-OR gate. The truth table of Ex-OR gate
is same as that of OR gate for first three rows. The only modification is in the fourth row. That
means, the output YY is zero instead of one, when both the inputs are one, since the inputs having
even number of ones.
Therefore, the output of Ex-OR gate is ‘1’, when only one of the two inputs is ‘1’. And it is zero,
when both inputs are same.
Below figure shows the symbol of Ex-OR gate, which is having two inputs A, B and one output, Y.
Ex-OR gate operation is similar to that of OR gate, except for few combination ss of inputs. That’s
why the Ex-OR gate symbol is represented like that. The output of Ex-OR gate is ‘1’, when odd
number of ones present at the inputs. Hence, the output of Ex-OR gate is also called as an odd
function.

Ex-NOR gate
The full form of Ex-NOR gate is Exclusive-NOR gate. Its function is same as that of NOR gate
except for some cases, when the inputs having even number of ones.
The following table shows the truth table of 2-input Ex-NOR gate.

A B Y = A⊙B

0 0 1

0 1 0

1 0 0

1 1 1

Here A, B are the inputs and Y is the output. The truth table of Ex-NOR gate is same as that of
NOR gate for first three rows. The only modification is in the fourth row. That means, the output is
one instead of zero, when both the inputs are one.
Therefore, the output of Ex-NOR gate is ‘1’, when both inputs are same. And it is zero, when both
the inputs are different.
The following figure shows the symbol of Ex-NOR gate, which is having two inputs A, B and one
output, Y.

Ex-NOR gate operation is similar to that of NOR gate, except for few combination ss of inputs.
That’s why the Ex-NOR gate symbol is represented like that. The output of Ex-NOR gate is ‘1’,
when even number of ones present at the inputs. Hence, the output of Ex-NOR gate is also called
as an even function.
From the above truth tables of Ex-OR & Ex-NOR logic gates, we can easily notice that the Ex-NOR
operation is just the logical inversion of Ex-OR operation.
The following Truth Table compares the logical functions of the main 2-input logic
gates.

Inputs Truth Table Outputs for each Gate

A B AND NAND OR NOR EX-OR EX-NOR

0 0 0 1 0 1 0 1

0 1 0 1 1 0 1 0

1 0 0 1 1 0 1 0

1 1 1 0 1 0 0 1

You might also like