Keithley SourceMeter 2600 Series Reference Manual page 289

Table of Contents

Advertisement

Series 2600 System SourceMeters Reference Manual
XOR'ing decimal 10 (binary 1010) with decimal 9 (binary 1001) will return a
Example
decimal 3 (binary 0011):
value = bit.bitxor(10, 9)
print(value)
Output:
bit.clear
Function
Clears a bit at a given index position.
Usage
value = bit.clear(value1, index)
value1
index
value
• This function clears a bit at a given index position.
Remarks
• Any fractional part of
is also an integer.
• The least significant bit of the given number is at index 1. The most significant bit is
at index 32.
• See
Also see
bit.get, bit.getfield, bit.set, bit.setfield, bit.test,
The binary equivalent of decimal 15 is 1111. If you clear the bit at index position 2, the
Example
returned decimal
value = bit.clear(15, 2)
print(value)
Output:
bit.get
Function
Retrieves the weighted value of a bit at a given index position.
Usage
value = bit.get(value1, index)
value1
index
value
• This function returns the value of the bit in
Remarks
same as returning
• Prior to retrieving the indexed bit, any fractional part of the given number will be
truncated to make it an integer. The least significant bit of the given number has an
index of 1 and the most significant bit has an index of 32.
• If the indexed bit for the number is set to 0, the result will be 0.
• See
3.000000e+00
Given number.
Index position of the bit to be cleared (1 to 32).
Returns the result of the manipulation.
value1
"Logic and bit
operations" on
would be 13 (binary 1101):
value
1.300000e+01
Given number.
Index position of the bit to be retrieved (1 to 32).
Returned weighted value of the bit.
value1
"Logic and bit
operations" on
Return to
Instrument Control Library 12-15
is truncated to make it an integer. The returned
page 12-13
for more information.
bit.toggle
value1
with all other non-indexed bits set to zero.
page 12-13
for more information.
Section 12 topics
value
at the given index. This is the
2600S-901-01 Rev. A / May 2006
of
value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents