For signed integers, why don't representative the smallest number as all zeros in binary, and the largest as all ones?
Frage
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
?
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit cs.stackexchange