The values of the fields of a
[boolean-set s (f₀ ... fₙ)]
expression are assigned sequentially to each bit in the array of
octets, starting at the most significant bit of octet 0. For example,
f₀ will be assigned to
the most significant bit of octet 0,
f₁ will be assigned to the
next most significant bit of octet 0,
f₇ will be assigned to the
least significant bit of octet 0, and
f₈ will be assigned to the
most significant bit of octet 1. In effect, for a given octet,
a true value for
the field n will be encoded
as 1 << (7 - n)
or pow(2, n).
Formally, the field at n
will be assigned to octet n / 8,
bit 7 - (n mod 8), where
0 is the index of the least
significant bit and 7 is the
index of the most significant bit.