University of Gondar
Institute of technology
Electrical and Computer engineering
Industrial automation (ECEg5233)
By Endalkachew D.
Chapter Three
Fundamentals of logic
Outlines
The Binary Concept
AND, OR, NOT and Exclusive-OR (XOR) Function
Developing Logic Gate Circuits from Boolean Expressions
Hardwired Logic versus Programmed Logic
The binary concept
The PLC, like all digital equipment, operates on the binary principle.
The term binary principle refers to the idea that many things can be thought of as
existing in only one of two states.
These states are 1 and 0.
The 1 and 0 can represent ON or OFF, open or closed, true or false, high or low, or any
other two conditions.
A logic gate is a circuit with several inputs but only
one output that is activated by particular combinations of
input conditions.
AND, OR, NOT and exclusive-OR (XOR) functions
The operations performed by digital equipment are based on three fundamental
logic functions: AND, OR, and NOT.
The AND Function
An AND gate is a device with two or more inputs and
one output.
The AND gate output is 1 only if all inputs are 1.
The basic rules that apply to an AND gate are:
• If all inputs are 1, the output will be 1.
• If any input is 0, the output will be 0.
Cont.…
Cont.…
The AND logic gate operates similarly to control devices connected in series, as
illustrated in Figure shown below.
The light will be on only when both switch A and switch B are closed.
The OR Function
An OR gate can have any number of inputs but only one output.
The OR gate output is 1 if one or more inputs are 1.
The basic rules that apply to an OR gate are:
If one or more inputs are 1, the output is 1.
If all inputs are 0, the output will be 0.
Cont.…
Cont.…
The OR logic gate operates similarly to control devices connected in parallel, as
illustrated in Figure below.
The light will be on if switch A or switch B or both are closed.
NOT function
Unlike the AND and OR functions, the NOT function can have only one input.
The NOT output is 1 if the input is 0.
The NOT output is 0 if the input is 1.
Since the output is always the reverse of the input it is called an inverter.
Cont.…
Acts like a normally closed pushbutton in series with the output.
XOR function
The output of this gate is HIGH only when one input or the other is HIGH, but not both.
The XOR function has two inputs and one output.
Additional logic functions
NAND (not AND)
NOR (not OR)
Developing logic gate circuits from Boolean expressions
Gate Boolean Equations
Each logic function can be expressed in terms of a Boolean expression
Cont.…
Boolean Equations
An understanding of the technique of writing simplified Boolean equations for
complex logical statements is a useful tool when creating PLC control programs.
Example 1
Example 2
Cont.…
Example 3
Example 4 (try)
Developing Logic Gate Circuits from Boolean Expressions
Example 1
Boolean expression: Y =AB+C
Cont.…
Example 2
Boolean expression Y =A(BC+D)
Cont.…
Example 3 (try it by your self)
Boolean expression 𝑌 = [(𝐴̅ + 𝐵 ̅ )𝐶 ] + 𝐷𝐸
Producing the Boolean Equation for a Given Logic Gate Circuit
Example 1
Cont.…
Example 2
Hardwired logic versus programmed logic
Hardwired logic refers to logic control functions that are determined by the way
devices are electrically interconnected.
Hardwired logic can be implemented using relays and relay ladder schematics.
Hardwired logic is fixed; it is changeable only by altering the way devices are
electrically interconnected.
Programmable control is based on the basic logic functions, which are
programmable and easily changed.
Cont.…
Cont.…
Cont.…
Cont.…
Cont.…
Hardwired Stop/Start Motor Control Circuit
Cont.…
Programmed Stop/Start Motor Control Circuit
Q??
Thank you!!