UD70
Issue code: 70nu2
4-6
DPL programming
Operators for integer variables only
& Logic AND
A
B
Y
0
0
0
0
1
0
1
0
0
1
1
1
Example
5 & 14 = 4
| Logic OR
A
B
Y
0
0
0
0
1
1
1
0
1
1
1
1
Example
5 | 14 = 15
Logic XOR
A
B
Y
0
0
0
0
1
1
1
0
1
1
1
0
Example
5 & 14 = 11
!Value
Bit invert
This Operator inverts the least-significant bit, and converts all
other bits to zero.
Example
100100
0 (binary) is converted to 0000011 (binary)
!(value, bit-field-size)
Bit-field invert
This Operator inverts the specified number of least significant
bits, and converts all other bits to zero. The bit
bit-field
-field-size
-size
specifies the number of least-significant bits that are to be
converted.
Example
Result% = !(value%, 3)
100100
100 (binary) is converted to 000011
011 (binary).
%
Remainder
This Operator gives the remainder when an integer is divided
by another integer.
Example
5 % 2 = 1
8 % 3 = 2
Summary of Contents for UD70
Page 6: ......
Page 14: ...UD70 Issue code 70nu2 2 6 Installation...
Page 42: ...UD70 Issue code 70nu2 4 20 DPL programming...
Page 98: ...UD70 Issue code 70nu2 7 22 Reference...