properly carry sign when performing signed -> unsigned and unsigned -> signed conversions