Rule of Sign Extension

Decreasing size of data

For unsigned numbers:
  All the bits being removed must be 0 !

For signed numbers:
  Bits being removed must be all 1's or 0's and the first bit not being removed must have the same value as the removed ones.

Increasing size of data

For unsigned numbers:
  All the new bits of the expanded number should be 0 !

For unsigned numbers:
  The new bits must be copies of the sign bit.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章