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 |
On this page of the site you can watch the video online bitwise operators in programming languages (python, c++, java, etc) explained with a duration of hours minute second in good quality, which was uploaded by the user On The Notebook 08 December 2025, share the link with friends and acquaintances, this video has already been watched 22 times on youtube and it was liked by 1 viewers. Enjoy your viewing!