August 2012
Intermediate to advanced
976 pages
30h 17m
English
The bitwise operators take operands of integral type that they use as a collection of bits. These operators let us test and set individual bits. As we’ll see in § 17.2 (p. 723), we can also use these operators on a library type named bitset that represents a flexibly sized collection of bits.
As usual, if an operand is a “small integer,” its value is first promoted (§ 4.11.1, p. 160) to a larger integral type. The operand(s) can be either signed or unsigned.
Table 4.3. Bitwise Operators (Left Associative)
If the operand is signed and its value is negative, then the way that the “sign bit” is handled in a number of ...
Read now
Unlock full access