docs.roxen.comBack to normal mode
DocsPike7.0TutorialExpressions
Copyright © 2012, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

Bitwise Operations

In the rare cases where you have to fiddle with the bits inside integers, you can use the bitwise operations in Pike. They work just like in C and C++, and if you need to use them, you probably already know what they mean.

OperationSyntax

Shift left

a << b

Shift right

a >> b

Bitwise not

~ a

Bitwise and

a & b

Bitwise or

a | b

Bitwise exclusive or

a ^ b