Thats strange, it shifts everything like the manual says. I have nothing to test it here, so maybe someone else can help you. Btw, you do already some, wrong, typecasting in your printing function, the format specifier %f specifies a floating point variable to be printed, you pass an integer.
And while we are at typecasting and stuff:
http://lmgtfy.com/?q=C+style+typecast 