NIMCET 2007 — Computer PYQ
NIMCET | Computer | 2007Zero has two representations in:
Choose the correct answer:
- A.
sign magnitude
- B.
1’s complement
(Correct Answer) - C.
2’s complement
- D.
None
1’s complement
Explanation
In digital logic and computer science, representing signed integers in binary code can be achieved through multiple methods. Let us analyze how the number 0 is represented under an n-bit system across the options.
1. Sign-Magnitude Representation
In a sign-magnitude system, the Most Significant Bit (MSB) acts strictly as a sign indicator (0 for positive, 1 for negative), while the remaining n−1 bits encode the actual magnitude.
Positive Zero (+0): The MSB is 0. For an 8-bit sequence, this looks like 000000002.
Negative Zero (−0): The MSB is 1. For an 8-bit sequence, this looks like 100000002.
Because +0=−0 in their bit patterns, sign-magnitude has two representations for zero.
2. 1's Complement Representation
In 1's complement, negative values are computed by flipping every bit of their positive counterpart.
Positive Zero (+0): Represented as all zeros, i.e., 000000002.
Negative Zero (−0): Created by bitwise inverting +0, resulting in all ones, i.e., 111111112.
Because these two distinct bit patterns both map mathematically to zero, 1's complement has two representations for zero.
3. 2's Complement Representation
In 2's complement, negative numbers are generated by taking the 1's complement and adding 1.
Positive Zero (+0): Represented as 000000002.
Negative Zero (−0):
1’s complement of 0=111111112
Add 1=111111112+12=1000000002
Since it is an 8-bit register, the extra carry bit on the far left overflows and is discarded, leaving 000000002.
Thus, +0 and −0 share the exact same binary pattern. 2's complement has only one unique representation for zero.
Ambiguity Note on the Options
Both (a) sign magnitude and (b) 1's complement explicitly feature dual representations for zero. In multiple-choice questions where only a single option must be picked, sign magnitude is typically designated as the primary historical example of this architectural drawback, though both options technically satisfy the condition.
Correct Answer: (a) sign magnitude (and (b) 1's complement)

