Operations onSigned Integers II
Numbers with the sign bit set
- Only signed numbers can be negative, and negative only if the sign bit is sete.g. C0F6, 80A7, FFFF
To convert signed, negative numbers from binary, octal, and hex to decimal
- negate the number (make positive)
- then convert to decimal
- then change the sign
- e.g. to convert signed C0F6 (negative)
= -(3F0A) - negate
= -(16,138) - convert
= -16,138 - change sign
- e.g. to convert signed 10101010
= -(01010110) - negate
= -(86) - convert
= -86 - change sign