Keithley 2601 Reference Manual page 272

System sourcemeter 2600 series (smu)
Hide thumbs Also See for 2601:
Table of Contents

Advertisement

Section 12: Instrument Control Library
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.
• See
"Logic and bit
Also see
bit.bitand,
Example
OR'ing 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
value2
value
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.
• See
"Logic and bit
Also see
bit.bitand,
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: 3.000000e+00
bit.clear
Function
Clears a bit at a given index position.
Usage
value = bit.clear(value1, index)
value1
index
value
Remarks
• This function clears a bit at a given index position.
• Any fractional part of value1 is truncated to make it an integer. The returned value 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
"Logic and bit
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: 1.300000e+01
bit.get
Function
Retrieves the weighted value of a bit at a given index position.
12-12
operations" on
page 12-10
bit.bitxor
operations" on
page 12-10
bit.bitor
operations" on
page 12-10
would be 13 (binary 1101):
value
Return to
Series 2600 System SourceMeter® Instruments Reference Manual
for more information.
First number for the XOR operation.
Second number for the XOR operation.
Returned result of the XOR operation.
for more information.
Given number.
Index position of the bit to be cleared (1 to 32).
Returns the result of the manipulation.
for more information.
bit.toggle
Section Topics
of
value
2600S-901-01 Rev. C / January 2008

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

26362602261126122635

Table of Contents