EasyManuals Logo

Tektronix Keithley 2601B-PULSE Reference Manual

Tektronix Keithley 2601B-PULSE
849 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 #372 background imageLoading...
Page #372 background image
Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-14 2601B-PULSE-901-01A April 2020
bit.set()
This function sets a bit at the specified index position.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
result = bit.set(value, index)
result
Result of the bit manipulation
value
Specified number
index
One-based bit position within value to set (1 to 32)
Details
This function returns result, which is value with the indexed bit set. The index must be
between 1 and 32.
The least significant bit of value is at index position 1; the most significant bit is at index
position 32.
Any fractional part of value is truncated to make it an integer.
Example
testResult = bit.set(8, 3)
print(testResult)
The binary equivalent of decimal 8 is 1000. If the bit at index
position 3 is set to 1, the returned value is decimal 12
(binary 1100).
Output:
1.20000e+01
Also see
Bit manipulation and logic operations (on page 9-4)
bit.clear() (on page 11-11)
bit.get() (on page 11-12)
bit.getfield() (on page 11-13)
bit.setfield() (on page 11-15)
bit.test() (on page 11-16)
bit.toggle() (on page 11-17)

Table of Contents

Other manuals for Tektronix Keithley 2601B-PULSE

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix Keithley 2601B-PULSE and is the answer not in the manual?

Tektronix Keithley 2601B-PULSE Specifications

General IconGeneral
BrandTektronix
ModelKeithley 2601B-PULSE
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals