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(in PMC, in INT)

band(in PMC, in 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(in PMC, in PMC, in INT)

band(in PMC, in PMC, in PMC)

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

bands(inout STR, in STR)

bands(in PMC, in STR)

bands(in PMC, in 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(in PMC, in PMC, in STR)

bands(in PMC, in PMC, in PMC)

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

bnot(inout INT)

bnot(in PMC)

Sets $1 to bitwise not $1 inplace.

bnot(out INT, in INT)

bnot(out PMC, in PMC)

n_bnot(out PMC, in PMC)

Set the bits of $1 to the not of the corresponding bits from $2.

bnots(inout STR)

bnots(in PMC)

bnots(out STR, in STR)

bnots(out PMC, in PMC)

n_bnots(out PMC, in PMC)

Set the bits of $1 to the not of the corresponding bits from $2.

bor(inout INT, in INT)

bor(in PMC, in INT)

bor(in PMC, in 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(in PMC, in PMC, in INT)

bor(in PMC, in PMC, in PMC)

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

bors(inout STR, in STR)

bors(in PMC, in STR)

bors(in PMC, in 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(in PMC, in PMC, in STR)

bors(in PMC, in PMC, in PMC)

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

shl(inout INT, in INT)

shl(in PMC, in INT)

shl(in PMC, in PMC)

Shift left $1 by $2 bits.

shl(out INT, in INT, in INT)

shl(in PMC, in PMC, in PMC)

shl(in PMC, in PMC, in INT)

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

shr(inout INT, in INT)

shr(in PMC, in INT)

shr(in PMC, in PMC)

Shift right $1 by $2 bits.

shr(out INT, in INT, in INT)

shr(in PMC, in PMC, in PMC)

shr(in PMC, in PMC, in INT)

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

lsr(inout INT, in INT)

lsr(in PMC, in INT)

lsr(in PMC, in PMC)

Shift $1 logically shifted right by $2 bits.

lsr(out INT, in INT, in INT)

lsr(out PMC, in PMC, in INT)

lsr(out PMC, in PMC, in PMC)

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

bxor(inout INT, in INT)

bxor(in PMC, in INT)

bxor(in PMC, in 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(in PMC, in PMC, in INT)

bxor(in PMC, in PMC, in PMC)

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

bxors(inout STR, in STR)

bxors(in PMC, in STR)

bxors(in PMC, in 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(in PMC, in PMC, in STR)

bxors(in PMC, in PMC, in PMC)

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

COPYRIGHT ^

Copyright (C) 2001-2004 The Perl Foundation. All rights reserved.

LICENSE ^

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


parrot