Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

EXPERIMENT- 1

DATE: 18.8.10

PROBLEM: Write Ladder Logic programs along with truth table to realize AND, OR,
NOT, NAND, NOR, XOR, XNOR logics.

1. AND Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %I62.01 %O62.00
A B Y
0 0 0
0 1 0
1 0 0 A B Y
1 1 1

EXPLANATION

For AND logic realization, two normally open contacts and one normally open relay are used.
The two contacts are in series. Current ‘i’ is passed through the contacts. When A and B are 0,
the contacts are open and current doesn’t pass through them and hence the output is de-
energised. Similarly for other inputs of truth table whenever any of the inputs is 0, current
doesn’t flow and the output is de-energised as the contacts are in series.

2. OR Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %O62.00
A B Y
0 0 0
0 1 1 A
1 0 1 Y
%I62.01
1 1 1

B
EXPLANATION

For OR logic realization, two normally open contacts A and B are used in parallel and one
normally open relay is used as output. When two inputs are de-energised i.e. A=0, B=0, no
current flows through it and output is de-energised (Y=0). Whenever any of the contacts is 1,
current flows through the contact which is in energised state to energise the output (Y=1).
3. NOT Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %O62.00
A Y
0 1
1 0
A Y

EXPLANATION

For NOT logic realization, one normally close and one normally open relay are used. When A is
0, the contact is in energised state since it is a NC contact and current flows through it and the
output becomes energised (Y=1). For A=1, the input contact becomes de-energised, hence
current doesn’t flow through it. So, the output also becomes de-energised (Y=0).

4. NOR Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %I62.01 %O62.00
A B Y
0 0 1
0 1 0
1 0 0 A B Y
1 1 0

EXPLANATION

For NOR logic realization, two normally close contacts A and B are used in series and one
normally open relay is used as output. When A and B are 0, since they are NC contacts they are
in energised state, hence current flows through the contacts and output is energised (Y=1).
When any of the contacts is 1 or both of them are 1, current doesn’t flow through them and
output is de-energised (Y=0).

5. NAND Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %O62.00
A B Y
0 0 1
0 1 1 A
1 0 1 Y
%I62.01
1 1 0

B
EXPLANATION

For NAND logic realization, two normally close contacts A and B are used in parallel and one
normally open relay is used as output Y. When A=0, B=0, the contacts are energised and current
flows through them as they are NC contacts to energise the output (Y=1). Similarly when any of
the contacts is in energised state, then output is energised because the contacts are in parallel
connection. When A=1 and B=1, two contacts are de-energised and current doesn’t flow
through them. So the output becomes de-energised (Y=0).

6. XOR Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %I62.01 %O62.00
A B Y
0 0 0
0 1 1 A B’
1 0 1 %I62.00 %I62.01 Y
1 1 0

A’ B
EXPLANATION

For XOR logic realization, two set of NO and NC contacts are used in series and two set of
contacts are used in parallel and one NO relay is used as output Y. When A=0, B=0, the
contacts are in de-energised state. So, no current flows through them and output becomes de-
energised (Y=0). When, A=0, B=1 or A=1, B=0, the current flows through any of paths and
output becomes energised (Y=1). When A=1, B=1, two paths become open and current doesn’t
flow through them. So, output becomes de-energised (Y=0).

6. XNOR Logic:
TRUTH TABLE LADDER LOGIC
%I62.00 %I62.01 %O62.00
A B Y
0 0 1
0 1 0 A B
1 0 0 %I62.00 %I62.01 Y
1 1 1

A’ B’
EXPLANATION

For XNOR logic realization, two NO contacts are used in series and two NC contacts are used
in series. Then they are connected in parallel and a NO relay is used as output. When A=0, B=0,
NO contacts are de-energised and NC contacts are energised and current flows through NC
contacts to energise output (Y=1). When A=0, B=1 or A=1, B=0, no current flows through any
of the paths and output is de-energised (Y=0). When A=1, B=1, NO contacts are energised and
current flows through them. So, output is energised (Y=1).

You might also like