i need to calculate left and right shift in java. in java i am able to code this. but i like to know how it calculate . Can any body here enplane me with Example. I am using below logic, plz check it's correct or not.
4>>2 ans is 1
Logic 4>>2 0100>>2 0001 = 1