1´s Complement Representation
Here, the role of the sign bit is the same as that of the signed magnitude form. Sign bit 0 and 1 represent the positive number and negative number respectively. The magnitude post represents the 1´s complement of the actual number.
Example 1:
Representation of +10 and -10:
Example 2:
- 5 represented by 1’s complement:
First, write + 5 → 0101 then takes its 1’s complement1010 → this represents the -5 in terms of one’s complement.
Properties of 1´s complement representation:
1. 1´s complement representation extends the same hardware for addition and subtraction.
2. 1´s complement is not the weighted system.
3. If a signed number in 1’s complement form is
Then its decimal equivalent will be
Where,
4. With the n bits, the range of numbers that can be represented in 1´s complement representation is
Example:
If we consider 8 bits, we can represent -127 to +127.
If we consider 4 bits, we can represent Range (-7 to +7).
5. Sign Extension in 1’s complement form:
Here, the sign bit is copied to all the extended positions.
Example:
Representation of -7: (without sign extension)
Representation of -7 in 8 bits: (with sign extension)
Question:
A number is represented in 1’s Complement as 100110. Find the equivalent decimal number.
Answer:
Contributed by