The title sums it up: left-shifting an uint64_t doesn't output the expected value, and I'd like to know why. What I get is the expected result with its 4 most significant bytes zeroed out. I'm using an x86_64 CPU (Intel i7 3770k), on Debian Jessie 64bit. This is a test program that reproduces the same behavior.
#include <stdio.h>
#include <stdint.h>
int main(int argc, char * * argv)
{
uint64_t var = 0xDEFEC8ED;
printf("%016x\n", var << 24);
return 0;
}
OUTPUT
00defec8ed000000 // expected
00000000ed000000 // obtained