Bit operations
The rest of the functions in this group are used for operations on the bits of a given number. These
functions can be used to:
â–ª Clear a bit
â–ª Toggle a bit
â–ª Test a bit
â–ª Set a bit or bit field
â–ª Retrieve the weighted value of a bit or field value
All these functions use an index parameter to specify the bit position of the given number. The least
significant bit of a given number has an index of 1, and the most significant bit has an index of 32.
The Test Script Processor (TSP) scripting engine stores all numbers internally as IEEE Std 754
double-precision floating-point values. The logical operations work on 32-bit integers. Any fractional
bits are truncated. For numbers larger than 4294967295, only the lower 32 bits are used.
bit.bitand() (on page 11-9)
bit.bitor() (on page 11-9)
bit.bitxor() (on page 11-10)
bit.clear() (on page 11-11)
bit.get() (on page 11-11)
bit.getfield() (on page 11-12)
bit.set() (on page 11-13)
bit.setfield() (on page 11-14)
bit.test() (on page 11-15)
bit.toggle() (on page 11-15)