RETURNS THE BINARY LOGICAL "OR" BETWEEN THE VALUES V1 AND V2
ACTION
The function BIN_OR(V1,V2) returns the value of the binary logical "OR" between V1 and V2.
V1 and V2 are data or variables which can be real or integer.
If a value is real, it is rounded to the nearest integer before the logical operation.
The logical operation is made bit-by-bit:
1 OR 1 = 1
1 OR 0 = 1
0 OR 1 = 1
0 OR 0 = 0
Application:
to force a bit to 1
After V1=BIN_OR(V1,1), the variable V1 has its last significant bit forced to 1, the other bits remain unchanged.
SYNTAX:
Result=BIN_OR(V1,V2)
USE ERROR EXAMPLE
print bin_or(3,5)
print "Result = 7"
BIN_OR()
BIN_OR(V1,V2)
SEE ALSO
BIN_AND()
BIN_XOR()