AND Operator :

  • If you & 1 with any number, the digits remain the same.
  • Pasted image 20240116133847.png
  • Q: Given a number M, find out if it's even or not :

OR Operator :

Pasted image 20240116134035.png

XOR Operator (^):

Pasted image 20240116134122.png

  • If you XOR any number with 1 we'll get complement (opposite) of that number
  • Pasted image 20240116134421.png
  • Pasted image 20240116134504.png

Left Shift Operator (<<) :

Pasted image 20240116150736.png

NOTE :
Pasted image 20240116150759.png
Pasted image 20240116150830.png

Right Shift ( >> ) :

Pasted image 20240116151111.png