protect against negative values that would exceed allowed bit width