=head1 NAME

bit.ops - Bitwise Opcodes

=head1 DESCRIPTION

Operations that deal with bits directly, either individually
or in groups.

The variant with an appended B<s> like B<bands> work on strings.

When making changes to any ops file, run C<make bootstrap-ops> to regenerate
all generated ops files.

=over 4


=cut

=item B<band>(inout INT, in INT)

Set the bits of $1 according to the B<and> of the corresponding bits
from $1 and $2.

=item B<band>(out INT, in INT, in INT)

Set the bits of $1 according to the B<and> of the corresponding bits
from $2 and $3.


=cut

=item B<bor>(inout INT, in INT)

Set the bits of $1 according to the B<or> of the corresponding bits
from $1 and $2.

=item B<bor>(out INT, in INT, in INT)

Set the bits of $1 according to the B<or> of the corresponding bits
from $2 and $3.


=cut

=item B<shl>(inout INT, in INT)

Shift left $1 by $2 bits.

=item B<shl>(out INT, in INT, in INT)

Set $1 to the value of $2 shifted left by $3 bits.


=cut

=item B<shr>(inout INT, in INT)

Shift right $1 by $2 bits.

=item B<shr>(out INT, in INT, in INT)

Set $1 to the value of $2 shifted right by $3 bits.


=cut

=item B<lsr>(out INT, in INT)

Shift $1 logically shifted right by $2 bits.

=item B<lsr>(out INT, in INT, in INT)

Set $1 to the value of $2 logically shifted right by $3 bits.


=cut

=item B<bxor>(inout INT, in INT)

Set the bits of $1 according to the B<xor> of the corresponding bits
from $1 and $2.

=item B<bxor>(out INT, in INT, in INT)

Set the bits of $1 according to the B<xor> of the corresponding bits
from $2 and $3.


=cut

=back


=cut

=head1 COPYRIGHT

Copyright (C) 2001-2010, Parrot Foundation.

=head1 LICENSE

This program is free software. It is subject to the same license
as the Parrot interpreter itself.


=cut

