Can you explain how do i get all the bit by n>>i

i dont get this plz explain

hello @mohitsingh

n>>i will perform right shifting i times. becuase of that the ith bit from(right) will come at rightmost place. and using & operator u can check whether it is set or not.

do this for all positions of i [0…31] to get status of evry bit

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.