<P> Result: 0869 . </P> <P> From the example one can see that 0 is even . </P> <P> If the last digit of N is odd digit one should add 0.5 to the result . </P>

Bitwise & can be used to divide a number by powers of 2