why BITOBYT is giving wrong answer.

I could not get what is the error in the following implementation of BITOBYT link

Can anyone please suggest what went wrong.Thanks

in your code you have applied if(y>10), if(y>2) so you see whatever number is greater than 10 will always be greater than 2 as well and one more thing the answer will be always something like a 0 0 or 0 a 0 or 0 0 a
Give it another try now and think why the answer is as i explained!!