![Keithley 707B Скачать руководство пользователя страница 265](http://html.mh-extra.com/html/keithley/707b/707b_reference-manual_661685265.webp)
Section 7: Command reference
Models 707B and 708B Switching Matrix Reference Manual
7-12
707B-901-01 Rev. A / August 2010
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
myResult = bit.clear(15, 2)
print(myResult)
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.301
Also see
(on page 7-17)
(on page 6-22)
bit.get()
This function retrieves the weighted value of a bit at a specified index position.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
result = bit.get(value, index)
result
Result of the bit manipulation
value
Specified number
index
One-based bit position within
value
to get (1 to 32)
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
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 will be zero (0).
Example
myResult = bit.get(10, 4)
print(myResult)
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.000