User Manual
Chapter 10
GFK-1503F
Jan 2020
Instruction Set Reference
101
10.1
Bit Operation Functions
The Bit Operation functions perform comparison, logical, and move operations on bit
strings. The Bit Operation functions are:
•
Logical AND
•
Logical OR
•
Exclusive OR
•
Logical Invert (NOT)
•
Shift Right/Shift Left
•
Rotate Right/Rotate Left
•
Bit Test
•
Bit Set, Bit Clear
•
Masked Compare
•
Bit Position
•
Bit Sequencer
10.1.1
Data Lengths for the Bit Operation Functions
The Logical AND, OR, XOR, and NOT (Invert) functions operate on a single word of data. The
other Bit Operation functions may operate on up to 256 words.
All Bit Operation functions require Word-type data. However, they operate on data as a
continuous string of bits, with bit 1 of the first word being the Least Significant Bit (LSB). The
last bit of the last word is the Most Significant Bit (MSB). For example, if you specified three
words of data beginning at reference %R0100, it would be operated on as 48 contiguous
bits.
Figure 59
Overlapping input and output reference address ranges in multi-word functions is not
recommended, it can produce unexpected results.
10.1.2
Bit Operation Functions Logical AND, Logical OR
Each scan that power is received, a Logical AND or Logical OR function examines each bit in
bit string I1 and the corresponding bit in bit string I2, beginning at the least significant bit in
each. A string length of 256 words can be selected.