Fill in the blanksQuestion 1 · Apply
Loading…
By the end you can write a negative integer in 8-bit one's complement and two's complement, and turn either back into denary.
A register holds only bits, so "negative" has to be encoded in the bits themselves. In both schemes below:
The schemes differ in how the remaining bits are worked out.
One's complement
A representation in which the negative of a number is formed by inverting every bit of its positive form (each 0 becomes 1 and each 1 becomes 0).
Two's complement
A representation in which the MSB has a negative place value (−128 in 8 bits) and all other bits keep their usual positive values. The negative of a number is formed by inverting every bit and then adding 1.
Worked example: Denary to one's and two's complement
Represent −42 in 8-bit one's complement and in 8-bit two's complement.