# 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 **band**(out INT, in INT, in INT)
Set the bits of $1 according to the **bor**(inout INT, in INT)
Set the bits of $1 according to the **bor**(out INT, in INT, in INT)
Set the bits of $1 according to the **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 **bxor**(out INT, in INT, in INT)
Set the bits of $1 according to the

**and**of the corresponding bits from $1 and $2.

**and**of the corresponding bits from $2 and $3.

**or**of the corresponding bits from $1 and $2.

**or**of the corresponding bits from $2 and $3.

**xor**of the corresponding bits from $1 and $2.

**xor**of the corresponding bits from $2 and $3.

# LICENSE

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