Bitwise shift operation

Hi everyone,
I want to know what happened internally in bitwise shift operation.
What happened when i execute the below statement ?
 
  value >> 10;


Is it equivalent of doing "value >> 1" 10 times ?(According to execution time)

Can i create an operator overloading for shift operator ?

Thanks.
The hardware can probably do value >> 10 in the same time as value >> 1 so doing value >> 1 10 times will be slower unless it is able to optimize it.

You can overload the shift operator. If you haven't noticed, that is exactly what the streams do.
Topic archived. No new replies allowed.