Liste des Groupes | Revenir à cl c |
Am 09.08.2024 um 20:19 schrieb David Brown:It's rarely significant that there's an extra value for signed integers - it's just one more out of 4 billion for 32-bit ints. (It's vital that you have all possible patterns for unsigned data.)On 09/08/2024 20:08, Bonita Montero wrote:... and you've got one more value since there's no negative andAm 08.08.2024 um 19:47 schrieb David Brown:>
>Think about negating a value. For two's complement, that means inverting each bit and then adding 1. For sign-magnitude, you>
invert the sign bit. For ones' complement, you invert each bit.
But with one's complement you have the same circuits for ading
and substracting like with unsigned values.
If you are trying to say that for two's complement, "a + b" and "a - b" use the same circuits regardless of whether you are doing signed or unsigned arithmetic, then that is correct. It is one of the reasons why two's complement became the dominant format.
>
positive zero.
Les messages affichés proviennent d'usenet.