I\'m pretty sure its just a matter of some bitwise operations, I\'m just not entirely sure of exactly what I should be doing, and all searches return back \"64 bit vs 32 bit
Use a union and get rid of the bit-operations:
// for int32_t, int64_t union { int64_t big; struct { int32_t x; int32_t y; }; }; assert(&y == &x + sizeof(x));
simple as that. big consists of both x and y.