TestBit: Testing One Bit

 

TestBit Function

Pin Diagram

This figure shows the pin diagram of the TestBit function:

G-SG-0030285.3.gif-high.gif

 

 

Functional Description

The TestBit function tests one bit specified by the bit in the given DWORD input. The bits are counted from low to high starting with 0.

The output shows the status of presence of bit in that specified position. The valid range is 0 to 31.

Input Pin Description

This table describes the input pins of the TestBit function:

Input

Data Type

Description

i_dwIput

DWORD

Input value

Range: 0...4294967295

i_iPos

INT

Bit position

Range: 0...31

Output Pin Description

This table describes the output pins of the TestBit function:

Output

Data Type

Description

TestBit

BOOL

Result is True or False

Limitations

If the i_iPos input is not within the valid range, the input will be interpretated in modulo mode.

Usage Example

G-SG-0030286.1.gif-high.gif

 

 

This figure shows an example of the TestBit function:

G-SG-0030287.2.gif-high.gif