This video explains bitwise operators such as bitwise AND, OR, XOR, NOT, left shift, and right shift (for unsigned).
NOTE: In the video I have explained shift operators for unsigned integers, but for right shift on signed integers, the sign bit is copied.
For example, in 4-bit representation:
1100 right shift 1 gives 1110
if 1100 was a signed 4-bit integer.
The left shift operator behaves the same for signed and unsigned integers.
⚠️ BUT: left-shifting a signed number can be undefined if:
it overflows
it changes the sign bit
Example:
01000000 left shift 1
might overflow(if left bit is considered sign bit) and become negative — undefined behavior in C/C.
Unsigned left shift is always safe.
general precedence of bitwise operators precedence. high to low.
Bitwise NOT ~: Has high precedence.
Bitwise Shift Operators: left and right shift
Bitwise AND &
Bitwise XOR ^
Bitwise OR |
En esta página del sitio puede ver el video en línea bitwise operators in programming languages (python, c++, java, etc) explained de Duración hora minuto segunda en buena calidad , que subió el usuario On The Notebook 08 diciembre 2025, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 22 veces y le gustó 1 a los espectadores. Disfruta viendo!