extract sign bit correctly