5.11.4 [203] Bit XOR/XNOR operation
Type Function Type Function
I1 % input value 1
O1 %
O1=XOR (I1 I2) if P2=1,
O1=XOR (I1 P1) if P2=2,
O1=XOR {XOR (I1 I2) P1} if
P2=3
I2 % input value 2 O2 % inverted output = (XNOR)
I3 b Master Set P1 % Mask
I4 b Master Reset P2 i Operation mode (1, 2 or 3)
Description:
The input value at I1 is Exclusive-OR combined. Via P2, you can select:
− P2 = 1: I1, I2 are Exclusive-OR combined.
− P2 = 2: I1, P1 are Exclusive-OR combined.
− P2 = 3: I1, I2, P1 are Exclusive-OR combined.
Master Set sets all bits of the output value (Output = 0xFFFF).
Master Reset deletes all bits of the output value (Output = 0x0000).
Examples:
P2 I1 I2 P1 O1 O2
1) XOR (I1 I2) 0xF00F 0x0F0F - 0xFF00 0x00FF
2) XOR (I1 P1) 0xF00F - 0x00FF 0xF0F0 0x0F0F
3) XOR {XOR (I1 I2) P1} 0xF00F 0x0F0F 0x00FF 0xFFFF 0x0000
Re example 1):
5.11.5 [210] Bit shift right
Type Function Type Function
I1 % input value 1 O1 % I1 bitwise shifted by P2
I2 - - O2 % inverted output
I3 b Master Set P1 - -
I4 b Master Reset P2 i Number of shifts
Description:
The input value at I1 is shifted to the right bitwise by the number of shifts (P2). Left side is
filled with zeroes.