NAME

bit.ops - Bitwise Operations

DESCRIPTION

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

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

band(inout INT, in INT)
band(invar PMC, in INT)
band(invar PMC, invar PMC)
Set the bits of $1 according to the and of the corresponding bits from $1 and $2.
band(out INT, in INT, in INT)
band(invar PMC, invar PMC, in INT)
band(invar PMC, invar PMC, invar PMC)
Set the bits of $1 according to the and of the corresponding bits from $2 and $3.
bands(inout STR, in STR)
bands(invar PMC, in STR)
bands(invar PMC, invar PMC)
Set the bits of $1 according to the and of the corresponding bits from $1 and $2.
bands(out STR, in STR, in STR)
bands(invar PMC, invar PMC, in STR)
bands(invar PMC, invar PMC, invar PMC)
Set the bits of $1 according to the and of the corresponding bits from $2 and $3.
bnot(inout INT)
bnot(invar PMC)
Sets $1 to bitwise not $1 inplace.
bnot(out INT, in INT)
bnot(out PMC, invar PMC)
bnots(inout STR)
bnots(invar PMC)
bnots(out STR, in STR)
bnots(out PMC, invar PMC)
bor(inout INT, in INT)
bor(invar PMC, in INT)
bor(invar PMC, invar PMC)
Set the bits of $1 according to the or of the corresponding bits from $1 and $2.
bor(out INT, in INT, in INT)
bor(invar PMC, invar PMC, in INT)
bor(invar PMC, invar PMC, invar PMC)
Set the bits of $1 according to the or of the corresponding bits from $2 and $3.
bors(inout STR, in STR)
bors(invar PMC, in STR)
bors(invar PMC, invar PMC)
Set the bits of $1 according to the or of the corresponding bits from $1 and $2.
bors(out STR, in STR, in STR)
bors(invar PMC, invar PMC, in STR)
bors(invar PMC, invar PMC, invar PMC)
Set the bits of $1 according to the or of the corresponding bits from $2 and $3.
shl(inout INT, in INT)
shl(invar PMC, in INT)
shl(invar PMC, invar PMC)
Shift left $1 by $2 bits.
shl(out INT, in INT, in INT)
shl(invar PMC, invar PMC, in INT)
shl(invar PMC, invar PMC, invar PMC)
Set $1 to the value of $2 shifted left by $3 bits.
shr(inout INT, in INT)
shr(invar PMC, in INT)
shr(invar PMC, invar PMC)
Shift right $1 by $2 bits.
shr(out INT, in INT, in INT)
shr(invar PMC, invar PMC, in INT)
shr(invar PMC, invar PMC, invar PMC)
Set $1 to the value of $2 shifted right by $3 bits.
lsr(out INT, in INT)
lsr(invar PMC, in INT)
lsr(invar PMC, invar PMC)
Shift $1 logically shifted right by $2 bits.
lsr(out INT, in INT, in INT)
lsr(invar PMC, invar PMC, in INT)
lsr(invar PMC, invar PMC, invar PMC)
Set $1 to the value of $2 logically shifted right by $3 bits.
rot(out INT, in INT, in INT, inconst INT)
Rotate $2 left or right by $3 and place result in $1. $4 is the amount of bits to rotate, 32 bit on a 32-bit CPU and 32 or 64 on a 64-bit CPU. If the rotate count is negative a rotate right by ($3+$4) is performed.
bxor(inout INT, in INT)
bxor(invar PMC, in INT)
bxor(invar PMC, invar PMC)
Set the bits of $1 according to the xor of the corresponding bits from $1 and $2.
bxor(out INT, in INT, in INT)
bxor(invar PMC, invar PMC, in INT)
bxor(invar PMC, invar PMC, invar PMC)
Set the bits of $1 according to the xor of the corresponding bits from $2 and $3.
bxors(inout STR, in STR)
bxors(invar PMC, in STR)
bxors(invar PMC, invar PMC)
Set the bits of $1 according to the xor of the corresponding bits from $1 and $2.
bxors(out STR, in STR, in STR)
bxors(invar PMC, invar PMC, in STR)
bxors(invar PMC, invar PMC, invar PMC)
Set the bits of $1 according to the xor of the corresponding bits from $2 and $3.

COPYRIGHT

Copyright (C) 2001-2009, Parrot Foundation.

LICENSE

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