What is “2's Complement”?

前端 未结 23 2541
名媛妹妹
名媛妹妹 2020-11-21 05:59

I\'m in a computer systems course and have been struggling, in part, with Two\'s Complement. I want to understand it but everything I\'ve read hasn\'t brought the p

23条回答
  •  -上瘾入骨i
    2020-11-21 06:36

    Two's complement is mainly used for the following reasons:

    1. To avoid multiple representations of 0
    2. To avoid keeping track of carry bit (as in one's complement) in case of an overflow.
    3. Carrying out simple operations like addition and subtraction becomes easy.

提交回复
热议问题