Left shift and right shift use'

what actually a left shift and right shift operator does to any operand ? can you give any formula ?

shift operators are used in bitwise representation
left shift has symbol ( << )
if a = 5 it has binary representatio 101
then a<<1 would shift all bits by 1 position left -> ( 1010) ie 10 ( left shift helps to multipy by 2 when shifted by 1)

right shift( >>)
if a= 5 ( a >> 1) would mean all bits shifted right by 1
(101 >>1 ) => ( 10)

read more here

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.