implement sign extension for 64 bit integers