For signed integers, why don't representative the smallest number as all zeros in binary, and the largest as all ones?
문제
I'm reading up on bitwise operators, complements, and two's complements, and I'm wondering why the lower limit of a range (aka lowest negative number) isn't all zeroes in binary, and the upper limit isn't all ones.
For example, for 8 bit integers, why don't we represent -128
as 0000 0000
, -127
as 0000 0001
, -1
as 0111 1111
, 0
as 1000 0000
, and +127
as 1111 1111
?
올바른 솔루션이 없습니다
제휴하지 않습니다 cs.stackexchange