Checks if a specified bit in a numeric value is on.

Syntax

BITSET(<int expN>, <bit expN>)

<int expN>

A 32-bit integer.

<bit expN>

The bit number, from 0 (the least significant bit) to 31 (the most significant bit).

Description

BITSET( ) evaluates the number <int expN> and returns true if the bit in position <bit expN> is on (set to 1), or false if it is off (set to 0). For example, the binary representation of 3 is

00000000 00000000 00000000 00000011

bit number 0 is on, bit number 2 is off.