DEV Community

loading...

Discussion on: Bitwise Operations in C/C++

Collapse
cmgg profile image
Carlos Galan • Edited

Couple of things i noticed

  • In the OR operator it says:

Denoted by | in C and C++, this operation produces the state of "on" if only one of the bit is in the "on" state.

It should say: any of the bits is in the "on" state.

  • In the Shift operators it says:

The operand on the wider part is the shift amount while the operand on the pointy side is the value being shifted.

Actually, the value on the left side of the operator is the value being shifted and the value on the right side is the number of times (or positions) it's going to be shifted.