the (1 << i) in your 64 bit code might be using a regular 32-bit int for the 1. (default word size)
So the 1 is shifted out completely. I don't understand how this produces the output you supplied though :)
Use 1ull for the constant (unsigned long long)