Model 2606B System SourceMeter® Instrument Reference Manual
Details
Any fractional part of value is truncated to make it an integer. The returned result is also an
integer.
The least significant bit of value is at index position 1; the most significant bit is at index
position 32.
Example
testResult = bit.clear(15, 2)
print(testResult)
The binary equivalent of decimal 15 is 1111. If you clear the bit at index position 2, the returned decimal value
is 13 (binary 1101).
Output:
1.30000e+01
Also see
Bit manipulation and logic operations
bit.set()
(on page 15-13)
bit.test()
(on page 15-15)
bit.toggle()
(on page 15-16)
bit.get()
This function retrieves the weighted value of a bit at a specified index position.
Type
TSP-Link accessible
Function
No
Usage
result = bit.get(value, index)
result
value
index
Details
This function returns the value of the bit in value at index. This is the same as returning value with
all other bits set to zero (0).
The least significant bit of value is at index position 1; the most significant bit is at index
position 32.
If the indexed bit for the number is set to zero (0), the result is zero (0).
Example
testResult = bit.get(10, 4)
print(testResult)
The binary equivalent of decimal 10 is 1010. If you get the bit at index position 4, the returned decimal
value is 8.
Output:
8.00000e+00
2606B-901-01 Rev. C November 2021
(on page 13-4)
Affected by
Where saved
Result of the bit manipulation
Specified number
One-based bit position within value to get (1 to 32)
Section 15: TSP command reference
Default value
15-11
Need help?
Do you have a question about the KEITHLEY SourceMeter 2606B and is the answer not in the manual?