NAME

bit.ops - Bitwise Opcodes

DESCRIPTION

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

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

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

band(inout INT, in INT)
Set the bits of $1 according to the and of the corresponding bits from $1 and $2.
band(out INT, in INT, in INT)
Set the bits of $1 according to the and of the corresponding bits from $2 and $3.
bor(inout INT, in INT)
Set the bits of $1 according to the or of the corresponding bits from $1 and $2.
bor(out INT, in INT, in INT)
Set the bits of $1 according to the or of the corresponding bits from $2 and $3.
shl(inout INT, in INT)
Shift left $1 by $2 bits.
shl(out INT, in INT, in INT)
Set $1 to the value of $2 shifted left by $3 bits.
shr(inout INT, in INT)
Shift right $1 by $2 bits.
shr(out INT, in INT, in INT)
Set $1 to the value of $2 shifted right by $3 bits.
lsr(out INT, in INT)
Shift $1 logically shifted right by $2 bits.
lsr(out INT, in INT, in INT)
Set $1 to the value of $2 logically shifted right by $3 bits.
bxor(inout INT, in INT)
Set the bits of $1 according to the xor of the corresponding bits from $1 and $2.
bxor(out INT, in INT, in INT)
Set the bits of $1 according to the xor of the corresponding bits from $2 and $3.

COPYRIGHT

Copyright (C) 2001-2010, Parrot Foundation.

LICENSE

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