ORRV is a CAOS command for a bitwise operation.
Syntax: ORRV var (int variable) mask (int)
Performs a bitwise OR operation on var. Wherever either var or mask contains a 1 bit, so will the corresponding bit in var after the operation. In C, this is
var = var | mask.
Here is a numeric example:
SETV va00 41 * 41 = %00101001 ORRV va00 186 * 186 = %10111010 OUTV va00 187 * 187 = %10111011
* va00 = A; va01 = B NOTV va00 * va00 = ~A NOTV va01 * va01 = ~B ANDV va00 va01 * va00 = ~A & ~B NOTV va00 * va00 = ~(~A & ~B)
ANDV has an example for constructing XOR.
- Mathworld on OR for algorithm in example