Chapter 5. Function Block Diagram (FBD)238 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C5.3 Bit Operation FunctionsThe Bit Operation functions perform comparison, logical, and move operations on bit strings. BitOperation functions treat each WORD or DWORD data as a continuous string of bits, with bit 1 of theWORD or DWORD being the Least Significant Bit (LSB). The last bit of the WORD or DWORD is theMost Significant Bit (MSB).WarningOverlapping input and output reference address rangesin multiword functions is not recommended, as it canproduce unexpected results.Function DescriptionLogical AND. Compares the bit strings IN1 and IN2 bit by bit. When the corresponding bitsare both 1, places a 1 in the corresponding location in output string Q; otherwise, places a0 in the corresponding location in Q.If additional inputs (IN3 through IN8) are used, each additional bit string is compared to thestring in Q and the result is placed in Q.For details, refer to Logical AND.Logical OR. Compares the bit strings IN1 and IN2 bit by bit. When a pair of correspondingbits are both 0, places a 0 in the corresponding location in output string Q; otherwise,places a 1 in the corresponding location in Q.If additional inputs (IN3 through IN8) are used, each additional bit string is compared to thestring in Q and the result is placed in Q.For details, refer to Logical OR.Logical XOR. Compares the bit strings IN1 and IN2 bit by bit. When a pair of correspondingbits are different, places a 1 in the corresponding location in the output bit string Q; when apair of corresponding bits are the same, places a 0 in Q.If additional inputs (IN3 through IN8) are used, each additional bit string is compared to thestring in Q and the result is placed in Q.For details, refer to Logical XOR.Logical NOT. Sets the state of each bit in output bit string Q to the opposite state of thecorresponding bit in bit string IN1.For details, refer to Logical NOT.Rotate Bits Left. Rotates all the bits in a string a specified number of places to the left.For details, refer to Bit Operation Functions in Chapter 4.