BITAND Function

Office 2013 and later

Last modified: March 09, 2015

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example

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.

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.

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.

BITAND(12,6)

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

Show: