EasyManuals Logo

Keithley 2651A Reference Manual

Keithley 2651A
800 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 #320 background imageLoading...
Page #320 background image
Section 7: Command reference Model 2651A High Power System SourceMeter® Instrument Reference Manual
7-12 2651A-901-01 Rev. A / March 2011
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 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 will be 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
Also see
bit.clear() (on page 7-11)
bit.set() (on page 7-13)
bit.test()
(on page 7-15)
bit.toggle()
(on page 7-15)
Logical operators
(on page 6-22)
bit.getfield()
This function returns a field of bits from the value starting at the specified index position.
Type TSP-Link accessible
Affected by Where saved Default value
Function No
Usage
result = bit.getfield(value, index, width)
result
Result of the bit manipulation
value
Specified number
index
One-based bit position within value to get (1 to 32)
width
The number of bits to include in the field (1 to 32)
Details
A field of bits is a contiguous group of bits. This function retrieves a field of bits from value starting at index.
The index position is the least significant bit of the retrieved field. The number of bits to return is specified by
width.
The least significant bit of value is at index position 1; the most significant bit is at index position 32.

Table of Contents

Other manuals for Keithley 2651A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 2651A and is the answer not in the manual?

Keithley 2651A Specifications

General IconGeneral
BrandKeithley
Model2651A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals