• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1int bit_not(int x) { return ~x; }
2
3int remainder(int x)    { return x %  2; }
4int remainder_eq(int x) { return x %= 2;}
5
6int shl   (int x) { return x <<  1; }
7int shl_eq(int x) { return x <<= 1; }
8int shr   (int x) { return x >>  1; }
9int shr_eq(int x) { return x >>= 1; }
10
11int bit_and   (int x) { return x &  1; }
12int bit_and_eq(int x) { return x &= 1; }
13int bit_or    (int x) { return x |  1; }
14int bit_or_eq (int x) { return x |= 1; }
15int bit_xor   (int x) { return x ^  1; }
16int bit_xor_eq(int x) { return x ^= 1; }
17