Conversion
For an n-bit word, suppose that dn-1 is the sign bit.
Then the decimal value is:
(-dn-1)* (2n-1) + the usual conversion of the remainder of the word.
Eg, n=3, then
101 = (-1 * 4) + 0 + 1 = -4 + 1 = -3
011 = (0 * 4) + 2 + 1 = 0 + 3 = 3
Previous slide
Next slide
Back to first slide
View graphic version