Converting between Different Bit Lengths
It is sometimes desirable to take an n-bit integer and store it in m bits,where
In sign-magnitude notation, this is easily accomplished: simply move the sign bit to
the new leftmost position and fill in with zeros.