BITAND Function

Returns a 16-bit binary number in which each bit is set to 1 only if the corresponding bit in both binarynumber1 and binarynumber2 is 1. Otherwise, the bit is set to 0.

Syntax

BITAND(binarynumber1, binarynumber2 )

Parameters

Name Required/Optional Data Type Description
binary number1
Required
Numeric
The first 16-bit binary number.
binary number2
Required
Numeric
The second 16-bit binary number.

Remarks

You can use this function to test and change properties of a shape that are stored as bitmasks, for example, the shape's text format.

Example

BITAND(12,6)

Returns 4. The 12 = 0...01100. The 6 = 0...00110. Therefore, BITAND(12,6) = 0...00100.