PROGRAMMABLE LOGIC CONTROLLERS(LL)-PKG.
PROGRAMMABLE LOGIC CONTROLLERS(LL)-PKG.
5th Edition
ISBN: 9781260535044
Author: Petruzella
Publisher: MCG
bartleby

Concept explainers

Question
Book Icon
Chapter 1, Problem 3P
Program Plan Intro

AND Operator:

  • An AND operator accepts two inputs and produces a single output.
  • If both the inputs are CLOSE, then the output is ON. Otherwise, the output is OFF.
  • In Boolean expression, the AND operation is expressed using the “.” dot operator or “*” asterisk operator.

  X= B     or      X=A * B

  where A and B are the inputs and X is the output.

Truth table for AND operator:

INPUTA

INPUT

B

OUTPUT

X

OPENOPENOFF
OPENCLOSEOFF
CLOSEOPENOFF
CLOSECLOSEON

OR Operator:

  • An OR operator accepts two inputs and produces a single output.
  • If both the inputs are OPEN, then the output is OFF. Otherwise, the output is ON.
  • In Boolean expression, the OR operation is expressed using the “+” plus sign.

    X=A+B

  where A and B are the inputs and X is the output.

Truth table for OR operator:

INPUTA

INPUT

B

OUTPUT

X

OPENOPENOFF
OPENCLOSEON
CLOSEOPENON
CLOSECLOSEON

Blurred answer
Students have asked these similar questions
Program a circuit where a yellow LED light will turn on when a button is pressed and remain on for 4 seconds. Then, a red light will flash at 2 Hz for 8 seconds.   C++
ALL INPUTS AND OUTPUTS OPERATIONS MUST BE DONE USING THEJOPTIONPANE. The following table shows the approximate speed of sound in air, water, and steel:Write a program that asks the user to enter “air”, “water”, or “steel”and thedistance that a sound wave will travel in the medium. The program should thendisplay the amount of time it will take. You can calculate the amount of time ittakes sound to travel in air with the following formula: Time = Distance / 1,100You can calculate the amount of time it takes sound to travel in water with the following formula:Time = Distance / 4,900You can calculate the amount of time it takes sound to travel in steel with the follow- ingformula:Time = Distance / 16,400
Write an expression using boolean variables a and b that evaluates to true when a and b are either both true or both false.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr