EasyManuals Logo
Home>Keithley>Measuring Instruments>2600B

Keithley 2600B User Manual

Keithley 2600B
897 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #354 background imageLoading...
Page #354 background image
Series 2600B
System SourceMeter® Instrument Reference Manual Section 7:
TSP command reference
2600BS-901-01 Rev. C / August 2016 7-15
Details
This function returns result, which is value with a field of bits overwritten, starting at index. The
index specifies the position of the least significant bit of value. The width bits starting at index
are set to fieldValue.
The least significant bit of value is at index position 1; the most significant bit is at index position
32.
Before setting the field of bits, any fractional parts of value and fieldValue are truncated to form
integers.
If fieldValue is wider than width, the most significant bits of the fieldValue that exceed the
width are truncated. For example, if width is 4 bits and the binary value for fieldValue is 11110 (5
bits), the most significant bit of fieldValue is truncated and a binary value of 1110 is used.
Example
testResult = bit.setfield(15, 2, 3, 5)
print(testResult)
The binary equivalent of decimal 15 is 1111. After
overwriting it with a decimal 5 (binary 101) at index
position 2, the returned value is decimal 11 (binary
1011).
Output:
1.10000e+01
Also see
Bit manipulation and logic operations (on page 5-3)
bit.get() (on page 7-12)
bit.set() (on page 7-13)
bit.getfield() (on page 7-12)
bit.test()
This function returns the Boolean value (true or false) of a bit at the specified index position.
Type TSP-Link accessible
Affected by Where saved Default value
Function
No
Usage
result = bit.test(value, index)
result
Result of the bit manipulation
value
Specified number
index
One-based bit position within value to test (1 to 32)
Details
This function returns result, which is the result of the tested bit.
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 value is 0, result is false. If the bit of value at index is 1, the returned
value is true.
If index is bigger than the number of bits in value, the result is false.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 2600B and is the answer not in the manual?

Keithley 2600B Specifications

General IconGeneral
BrandKeithley
Model2600B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals