[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

These procedures treat integers as half-open bit vectors. If an integer is positive, it is regarded as if infinite number of zeros are padded to the left. If an integer is negative, it is regarded in 2's complement form, and infinite number of 1's are padded to the left.

The API is consisntent to SLIB's "logical" module.

__Function:__**ash***n count*- Shifts integer
`n`left with`count`bits. If`count`is negative,`ash`

shifts`n`right with -`count`bits.; Note: 6 == [...00110], and ; -6 == [...11010] (ash 6 2) => 24 ;[...0011000] (ash 6 -2) => 1 ;[...0000001] (ash -6 2) => -24 ;[...1101000] (ash -6 -2) => -2 ;[...1111110]

__Function:__**logand***n1 n2 ...*__Function:__**logior***n1 n2 ...*__Function:__**logxor***n1 n2 ...*- Returns bitwise and, bitwise inclusive or and bitwise exclusive or
of two or more integers
`n1`,`n2`....

__Function:__**lognot***n*- Returns bitwise not of an integer
`n`.

__Function:__**logtest***n1 n2 ...*- ==
`(not (zero? (logand`

`n1``n2`...)))

__Function:__**logbit?***index n*- Returns
`#t`

if`index`-th bit of integer`n`is 1,`#f`otherwise.

__Function:__**bit-field***n start end*- Extracts (
`start`+1)-th bit to`end`-th bit (inclusive) from an exact integer`n`, where`start`<`end`.

__Function:__**copy-bit***index n bit*- If
`bit`is true, sets`index`-th bit of an exact integer`n`. If`bit`is false, resets`index`-th bit of an exact integer`n`.

__Function:__**copy-bit-field***n start end from*

__Function:__**logcount***n*

__Function:__**integer-length***n*

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

This document was generated by