integer>bit-array ( n -- bit-array )
Bit arrays

Prev:clear-bits ( bit-array -- )
Next:bit-array>integer ( bit-array -- n )


Vocabulary
bit-arrays

Inputs
nan integer


Outputs
bit-arraya bit-array


Word description
Outputs a freshly-allocated bit array whose elements correspond to the bits in the binary representation of the given unsigned integer value.

Notes
The bits of the integer are stored in the resulting bit array in order of ascending significance, least significant bit first. This word will fail if passed a negative integer. If you want the two's-complement binary representation of a negative number, use bitnot to get the complement of the number first. This word works with fixnums or bignums of any size; it is not limited by fixnum size or machine word size.

Definition