GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 2.17

Signed representations of zero

Digital Logic · Number Systems & Computer Arithmetic · Full GATE CSE 1999 paper

GATE 1999, Q2.17 2 marks · MSQ
Report issue

Number Systems & Computer Arithmetic

Question 2.17, GATE 1999: Which schemes have two zeros: sign-magnitude,ones complement,twos complement,none?
Tap to enlarge
Select all that apply
Answer & solution

Answer: A,B (no official key was published)

In sign-magnitude, magnitude bits all zero represent zero with either sign bit, producing +0 and −0. In ones complement, complementing the all-zero positive representation yields the all-one negative-zero pattern. In twos complement, negation complements then adds one, returning zero to the all-zero pattern after overflow is discarded; the all-one pattern represents −1 instead. Thus exactly A and B have two zero representations.

Original paper, page 5