XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


selectlib (selectlib-4.77) [xmmsas_20230412_1735-21.0.0]

Bitwise operators

For bit manipulations the following six operators are provided:
description operand example
bitwise AND & b001110110 & b0111 = b110
bitwise OR | b001110110 | b0101 = b1110111
bitwise exclusive OR $\wedge$ b001110110 $\wedge$ b0111 = b1110001
left shift « b111 « 2 = b11100
right shift » b111 » 2 = b1
one's complement (32 bit) $\sim$ $\sim$b111000 = b111...000111



XMM-Newton SOC -- 2023-04-16