GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 1.15

Twos-complement representation of negative fifteen

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

GATE 2002, Q1.15 1 mark · MCQ
Report issue

Number Systems & Computer Arithmetic

Question 1.15, GATE 2002: Which bit string is a two’s-complement representation of decimal −15?
(A) 1111; (B) 11111; (C) 111111; (D) 10001.
Question 1.15, GATE 2002: Which bit string is a two’s-complement representation of decimal −15?
(A) 1111; (B) 11111; (C) 111111; (D) 10001.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (10 steps)

Step 1: Choose a width that can represent the value.

Step 2: The n-bit two’s-complement range is−2n−1 through 2n−1−1. Four bits cannot hold−15, while five bits can. At width five, +15 is 01111; complementing gives 10000 and adding one gives 10001. Interpreting10001 as unsigned 17 and subtracting 32 independently checks−15.

Conclusion: At least 5 bits are needed because the 4-bit signed range is−8 through 7. In5 bits, −15 is 25−15=17=10001₂, D. Strings consisting entirely of ones represent−1, not−15.

Original paper, page 2