beautypg.com

And (and), Using arithmetic status bits – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual

Page 305

background image

Chapter 21
Move and Logical Instructions

21–5

And

AND

Output Instruction

(AND)

AND

BITWISE AND
Source A

B3:6

0001000111010111

Source B

B3:7

0000100100100100

Dest

B3:8

0000000100000100

F1

F2

F3

F4

F5

ZOOM on AND –(AND)– 2.3.0.0.2
NAME: BITWISE AND
SOURCE A: B3:6 0001 0001 1101 0111
SOURCE B: B3:7 0000 1001 0010 0100
DEST: B3:8 0000 0001 0000 0100

EDT_DAT

HHT Ladder Display:

HHT Zoom Display:

Ladder Diagrams and APS Displays:

(online monitor mode)

The value at source A is ANDed bit by bit with the value at source B and
then stored in the destination.

Truth Table:

R = A AND B

A B R

0 0 0
1 0 0
0 1 0
1 1 1

A: Source A bit
B: Source B bit
R: Destination bit

Using Arithmetic Status Bits

C always reset

V always reset

Z set if the result is zero; otherwise reset

S set if the most significant bit is set; otherwise reset

And (AND)