masking a 64-bit value with a 32-bit mask that's zero-extended will turn off many more bits than intended. make the value the right length so when taking its complement, the high-order bits will remain.