Bit (n) is a bit-string variable where n is an integer valued expression that specifies the length of the string value held by the variable. Bit (n) is a sequence of binary digits (bits) that always occupies exactly n bits of storage.
For Intel platforms, using the -bitsltr compiler option stores bit strings as Big-Endian. See -bitsltr in the Compiler Options help topic for more information.
If the high-order bit of the bit-string does not occur on a byte boundary, the remaining bits in the last byte might be part of another bit-string variable. Within each byte, the bits of the string are stored from the low-order to the high-order bit position. Note the bit positions are zero-relative similar to the hardware bit-numbering. For example, Bit (23) would be stored as follows (assuming an unaligned starting bit offset of 5):
If the low-order bit of the bit-string does not occur on a byte boundary, the remaining bits in the last byte might be part of another bit-string variable. Within each byte, the bits of the string are stored from the low-order to the high-order bit position (on Intel platforms). Note the bit positions are zero-relative similar to the hardware bit-numbering. For example, Bit (23) would be stored as follows (assuming an unaligned starting bit offset of 5):
On little-endian platforms, bit-strings are essentially stored "right-to-left" according the Intel hardware bit-ordering, but all bit operations are performed according to PL/I language semantics.