Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

$ZBITAND (legacy function) (ObjectScript)

Bitstring function – AND.




This page describes the legacy function $ZBITAND. It is described here for compatibility with legacy applications.

$ZBITAND returns a bitstring formed by the (bitstring1 AND bitstring2) operation. The length of the resulting bitstring equals the length of the shorter of the two specified bitstrings. The value of the resulting bitstring is 1 in all positions where both bitstrings held a 1, and 0 in all other positions.


If bitstring1 = [0,1,1,0] and bitstring2 = [0,1,0,0], then the result of $ZBITAND would be [0,1,0,0]. That is:

Position 1: 0 and 0 = 0

Position 2: 1 and 1 = 1

Position 3: 1 and 0 = 0

Position 4: 0 and 0 = 0

See Also