omron — BOR operator

BOR operator BOR operator Syntax ... value BOR value ... Function Perform the binary OR operation on two values. Usage Considerations The BOR operation is meaningful only when performed on integer values. Only the integer parts of real values are used. Any fractional parts are ignored. Details The BOR operator can be used to perform a binary OR operation on two values on a bit-by-bit basis, resulting in a real value. Specifically, the BOR operation consists of the following steps: 1. Convert the operands to sign-extended 32-bit integers, truncating any fractional part. 2. Perform a binary OR operation (see below). 3. Convert the result back to a real value.

During the binary OR operation, c = a BOR b the bits in the resultant C statement are determined by comparing the corresponding bits in the operands A and B, as indicated in the following table. That is, a bit in the result will be 1 if the corresponding bit in either of the operands is 1. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 96 For each bit in: a b c 0 0 -> 0 0 1 -> 1 1 0 -> 1 1 1 -> 1