User manual
Section 13: Instrument Control Library (ICL) Series 3700 System Switch/Multimeter Reference Manual
13-18 3700S-901-01 Rev. C / July 2008
bit.bitand()
Also see
Logic and bit operations (on page 13-17)
bit.bitor() (on page 13-18)
bit.bitxor() (on page 13-18)
Example
AND'ing decimal 10 (binary 1010) with decimal 9 (binary 1001) will return a value of
decimal 8 (binary 1000):
value = bit.bitand(10, 9)
print(value)
Output: 8.000000e+00
bit.bitor()
Function
Performs a bitwise logical OR operation on two numbers.
Usage
value = bit.bitor(value1, value2)
value1: First number for the OR operation.
value2: Second number for the OR operation.
value: Returned result of the OR operation.
Remarks
This function performs a logical OR operation on two numbers.
Any fractional parts of value1 and value2 are truncated to make them
integers. The returned value is also an integer.
Also see
Logic and bit operations (on page 13-17)
bit.bitand() (on page 13-17)
bit.bitxor() (on page 13-18)
Example
Performs a bitwise logical OR operation on decimal 10 (binary 1010) with decimal 9
(binary 1001); will return a value of decimal 11 (binary 1011):
value = bit.bitor(10, 9)
print(value)
Output: 1.100000e+01
bit.bitxor()
Function
Performs a bitwise logical XOR (Exclusive OR) operation on two numbers.
Usage
value = bit.xor(value1, value2)
value1: First number for the XOR operation.
value2: Second number for the XOR operation.
value: Returned result of the XOR operation.
Remarks
This function performs a logical Exclusive OR operation on two numbers.
Any fractional parts of value1 and value2 are truncated to make them
integers. The returned value is also an integer.