For example, 01011001 represents + 169 and
11011001 represents - 169
What is 00000000 and 10000000 in signed magnitude form?
The concept of complement
The concept of complements is used to represent signed number.
Consider a number system of base-r or radix-r. There are two types of complements,
- The radix complement or the r’s complement.
- The diminished radix complement or the (r - 1)’s complement.
Diminished Radix Complement :
Given a number N in base r having n digits, the (r - 1)’s complement of N is defined as For decimal numbers, r = 10 and r - 1 = 9, so the 9’s complement of N is .
e.g., 9’s complement of 5642 is 9999 - 5642 = 4357.
|