Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section


Convert strings to bitstrings.

Background Information

A bitstring is a kind of string, made up of a compressed series of bits. ObjectScript provides the $BIT function and other functions for working with bitstrings. For an overview, see “Bitstrings” in the ObjectScript Tutorial.

Caché MVBasic also supports bitstrings; see “Caché MultiValue Basic Functions” in the Caché MultiValue Basic Reference.

Available Tools

In addition to the language functions, InterSystems provides the following tools:

Provides the following methods to convert to bitstrings:

  • StringToBit()

  • ZBitToBit()

Availability: All namespaces.


The special variable $SYSTEM is bound to the %SYSTEM package. This means that (for ObjectScript) instead of ##class(%SYSTEM.class).method(), you can use $SYSTEM.class.method().