Time complexity of bitwise operators

if we right shift or left shift a number by c then its complexity is O© or O(1)?

@Rj.25 o(1) as you are only dividing and multiplying by 2
hope its clear if yes dont forget to hit like and mark resolved :smiley:

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.

but my question is if we right shift a number by more than 1 like n>>2 or n<<2 then it will take O© OR o(1) WHERE C IS THE NUMBER OF BITS WE HAVE SHIFTED IT IN THE EXAMPLE IT IS 2?

@Rj.25 it will also take o(1) as basically you are just dividing by power of 2 or multiplying by pow of 2
n=n>>c is n/(2 pow c)

it is o(1) ,it is equal to dividing by a power of 2, which is O(1)