Did you know ... Search Documentation:
Pack canny_tudor -- prolog/canny/bits.pl
PublicShow source
 bits(+Shift, +Width, ?Word, ?Bits, ?Rest) is semidet
Unifies Bits within a Word using Shift and Width. All arguments are integers treated as words of arbitrary bit-width.

The implementation uses relational integer arithmetic, i.e. CLP(FD). Hence allows for forward and backward transformations from Word to Bits and vice versa. Integer Word applies a Shift and bit Width mask to integer Bits. Bits is always a smaller integer. Decomposes the problem into shifting and masking. Treats these operations separately.

Arguments:
Width- of Bits from Word after Shift. Width of zero always fails.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 bits(Arg1, Arg2, Arg3, Arg4)
 bits(Arg1, Arg2, Arg3)