Model 2606B System SourceMeter® Instrument Reference Manual
Example
testResult = bit.bitand(10, 9)
print(testResult)
Performs a logical AND operation on decimal 10 (binary 1010) with decimal 9 (binary 1001), which returns a
value of decimal 8 (binary 1000).
Output:
8.00000e+00
Also see
Bit manipulation and logic operations
bit.bitor()
(on page 15-9)
bit.bitxor()
(on page 15-10)
bit.bitor()
This function performs a bitwise logical OR operation on two numbers.
Type
TSP-Link accessible
Function
No
Usage
result = bit.bitor(value1, value2)
result
value1
value2
Details
Any fractional parts of value1 and value2 are truncated to make them integers. The returned
result is also an integer.
Example
testResult = bit.bitor(10, 9)
print(testResult)
Performs a bitwise logical OR operation on decimal 10 (binary 1010) with decimal 9 (binary 1001), which
returns a value of decimal 11 (binary 1011).
Output:
1.10000e+01
Also see
Bit manipulation and logic operations
bit.bitand()
(on page 15-8)
bit.bitxor()
(on page 15-10)
2606B-901-01 Rev. C November 2021
(on page 13-4)
Affected by
Where saved
Result of the logical OR operation
Operand for the logical OR operation
Operand for the logical OR operation
(on page 13-4)
Section 15: TSP command reference
Default value
15-9
Need help?
Do you have a question about the KEITHLEY SourceMeter 2606B and is the answer not in the manual?