IAT LESSON 06 Logic Gates Boolean Logic in PLCs
IAT LESSON 06 Logic Gates Boolean Logic in PLCs
University of Makati
College of Technology Management
Objectives:
logic expressions.
Introduction
module covers the basic logic gates, Boolean algebra, and their direct
is built upon logic gates and Boolean algebra. This module explores the
basic logic gates, their role in PLC programming, and how Boolean
1. AND Gate
Function:
The AND gate outputs HIGH (1) only when all inputs are HIGH
Truth Table:
(output) to activate.
Application:
before activation.
2. OR Gate
Function:
The OR gate outputs HIGH (1) if at least one input is HIGH (1).
Truth Table:
Application:
available.
Function:
The NOT gate inverts the input—if the input is HIGH (1), the
Truth Table:
Application:
detects overheating.
Function:
The NAND gate is the opposite of the AND gate. It outputs LOW (0)
only when all inputs are HIGH (1); otherwise, it outputs HIGH
(1).
Truth Table:
Application:
Function:
The NOR gate is the opposite of the OR gate. It outputs HIGH (1)
Truth Table:
Application:
Function:
The XOR gate outputs HIGH (1) when inputs are different (one is
HIGH, the other is LOW). If both inputs are the same, it outputs
LOW.
Truth Table:
Application:
Function:
The XNOR gate is the opposite of the XOR gate. It outputs HIGH (1)
when both inputs are the same (both HIGH or both LOW). If
Truth Table:
Application:
sensors disagree.
Summary Table
Functi
Gate Output Condition
on
AND A*B 1 if all inputs are 1
OR A+B 1 if at least one input is 1
NOT A' Inverts input
NAND (A * B)' 0 if all inputs are 1
A⊕B
NOR (A + B)' 1 if all inputs are 0
(A ⊕ B)'
XOR 1 if inputs are different
XNOR 1 if inputs are the same
Conclusion
Text (ST).
Troubleshooting complexity
a) Commutative Law
b) Associative Law
restructured.
c) Distributive Law
A⋅(B+C)=(A⋅B)+(A⋅C)
Logic.
d) Identity Law
A+0=A
A⋅1=A
the result.
e) Complement Law
A+A′=1
A⋅A′=0
a) Idempotent Law
A+A=A
A⋅A=A
b) Absorption Law
A+AB=A
A(A+B)=A
c) De Morgan’s Theorem
(A⋅B)′=A′+B′
(A+B)′=A′⋅B′
AND/OR logic.
operate if:
Boolean Expression:
Y=(A⋅M)+(B⋅E)
o One for A⋅
Simplification Example
Y=A+AB
Y=A
Given:
Y=AB+A(B+C)
Step-by-step simplification:
Y=AB+AC
Final optimized logic uses only two AND gates and one OR
Given:
Y=A+A⋅B
Y=A
resources.
Question:
Y=A⋅(B+C)+A′B
Solution:
Question:
Solution:
Optimization:
=B(A+A′)+B′C
=B+B′C
=B+C
Question:
Y=A+AB+A′B
Solution:
So, Y=A+A′B
6. Conclusion
PROGRAMMING
circuits using symbols that mimic relay logic. Logic gates play a crucial
The AND gate requires both inputs to be HIGH (1) for the output to
coil is activated.
Application Example:
both the start button is pressed (Input A) and the safety sensor
2. OR Gate Implementation
The OR gate requires at least one input to be HIGH for the output to
activated.
Application Example:
--[/]--( )--
Application Example:
pressed (Input A), the circuit should cut off power to the motor.
The XOR gate is HIGH only if one input is HIGH and the other is
other is FALSE.
Application Example:
--[/Tank_A_Full]--(Pump)--
--[/Tank_B_Full]--(Pump)--
Objective:
logic).
ON.
Objective:
Objective:
( Machine_Start )--
Explanation:
Conclusion
XOR gates ensures efficient and safe PLC programming. Through real-
MODULE SUMMARY
module covered the seven basic logic gates (AND, OR, NOT, NAND,
KEY TAKEAWAYS
in industrial automation.
control systems.
automation applications.
effectiveness.
MODULE CONCLUSION
Mastering logic gates and Boolean algebra is essential for efficient PLC
OR, NOT, XOR, and other logic functions allows engineers to create
REFERENCES