User manual
Series 3700 System Switch/Multimeter Reference Manual  Section 13: Instrument Control Library (ICL) 
3700S-901-01 Rev. C / July 2008  13-19 
bit.bitxor() 
Details 
Logic and bit operations (on page 13-17) 
bit.bitor() (on page 13-18) 
Example 
Performs a bitwise logical exclusive OR operation on decimal 10 (binary 1010) with 
decimal 9 (binary 1001); will return a value of 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: Given number. 
index: Index position of the bit to be cleared (1 to 32). 
value: Returns the result of the manipulation. 
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. 
Also see 
Logic and bit operations (on page 13-17) 
bit.get() (on page 13-19) 
bit.getfield() (on page 13-20) 
bit.set() (on page 13-21) 
bit.setfield() (on page 13-21) 
bit.toggle() (on page 13-23) 
Example 
The binary equivalent of decimal 15 is 1111. If you clear the bit at index position 2, the 
returned decimal value would be 13 (binary 1101): 
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. 
Usage 
value = bit.get(value1, index) 
value1: Given number. 
index: Index position of the bit to be retrieved (1 to 32). 
value: Returned weighted value of the bit. 










