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 |
Nesta página do site você pode assistir ao vídeo on-line bitwise operators in programming languages (python, c++, java, etc) explained duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário On The Notebook 08 Dezembro 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 22 vezes e gostou 1 espectadores. Boa visualização!