@c =================================================================== @c
@c    serrano/prgm/project/bigloo/manuals/bit.texi                     @c
@c    ------------------------------------------------------------     @c
@c    Author      :  Manuel Serrano                                    @c
@c    Creation    :  Mon Feb 25 10:48:23 2002                          @c
@c    Last change :                                                    @c
@c    Copyright   :  2002 Manuel Serrano                               @c
@c    ------------------------------------------------------------     @c
@c    Bit manipulation                                                 @c
@c =================================================================== @c

@c ------------------------------------------------------------------- @c
@c    Bit manipulation                                                 @c
@c ------------------------------------------------------------------- @c
@node  Bit Manipulation, Hash Tables, Serialization, Standard Library
@comment  node-name,  next,  previous,  up
@section Bit manipulation
@cindex bit manipulation

These procedures allow the manipulation of fixnums as bit-fields.
@deffn {bigloo procedure} bit-or i1 i2
@deffnx {bigloo procedure} bit-xor i1 i2
@deffnx {bigloo procedure} bit-and i1 i2
@deffnx {bigloo procedure} bit-not i
@deffnx {bigloo procedure} bit-lsh i1 i2
@deffnx {bigloo procedure} bit-rsh i1 i2

@smalllisp
(bit-or 5 3)                           @result{} 7
(bit-xor 5 3)                          @result{} 6
(bit-and 5 3)                          @result{} 1
(bit-not 5)                            @result{} -6
(bit-lsh 5 3)                          @result{} 40
(bit-rsh 5 1)                          @result{} 2
@end smalllisp
@end deffn
