chickadee » srfi-178 » integer->bitvector

integer->bitvector integer #!optional lenprocedure

Returns a bitvector whose length is len whose values correspond to the bits of integer, a non-negative exact integer, starting with the least significant bit as bit 0. This ensures compatibility with the integers-as-bits operations of SRFI 151.

The default value of len is (integer-length integer). If the value of len is less than the default, the resulting bitvector cannot be converted back by bitvector->integer correctly.