| parrotcode Bitwise Operations | |
| Docs | FAQ | Download | Examples | Talks | Resources | Perl 6 | Languages | Who's Who | Donors | Cage Cleaners | Wiki | |
bit.ops - Bitwise Operations
Operations that deal with bits directly, either individually or in groups.
The variant with an appended s like bands work on strings.
The variants with a prepended n_ like <n_bnot> generate a new target PMC.
If possible,
they use the appropriate language type,
specified with .HLL.
Set the bits of $1 according to the and of the corresponding bits from $1 and $2.
Set the bits of $1 according to the and of the corresponding bits from $2 and $3.
Set the bits of $1 according to the and of the corresponding bits from $1 and $2.
Set the bits of $1 according to the and of the corresponding bits from $2 and $3.
Sets $1 to bitwise not $1 inplace.
Set the bits of $1 to the not of the corresponding bits from $2.
Set the bits of $1 to the not of the corresponding bits from $2.
Set the bits of $1 according to the or of the corresponding bits from $1 and $2.
Set the bits of $1 according to the or of the corresponding bits from $2 and $3.
Set the bits of $1 according to the or of the corresponding bits from $1 and $2.
Set the bits of $1 according to the or of the corresponding bits from $2 and $3.
Shift left $1 by $2 bits.
Set $1 to the value of $2 shifted left by $3 bits.
Shift right $1 by $2 bits.
Set $1 to the value of $2 shifted right by $3 bits.
Shift $1 logically shifted right by $2 bits.
Set $1 to the value of $2 logically shifted right by $3 bits.
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.
Set the bits of $1 according to the xor of the corresponding bits from $1 and $2.
Set the bits of $1 according to the xor of the corresponding bits from $2 and $3.
Set the bits of $1 according to the xor of the corresponding bits from $1 and $2.
Set the bits of $1 according to the xor of the corresponding bits from $2 and $3.
Copyright (C) 2001-2008, The Perl Foundation.
This program is free software. It is subject to the same license as the Parrot interpreter itself.
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|