← 2024 Paper 2

UPSC 2024 Maths Optional Paper 2 Q5c-i — Step-by-Step Solution

5 marks · Section B

Representation of Integers, Signed Integers, and Reals (incl. Double Precision) · Numerical Analysis · Read the full method →

Question

Determine the decimal equivalent in sign-magnitude form of (8D)16(8D)_{16} and (FF)16(FF)_{16}.

Technique

Convert hex to 8-bit binary; the MSB is the sign bit; the remaining 7 bits give the magnitude.

Solution

(8D)16(8D)_{16}:

8=100028=1000_2, D=11012D=1101_2(8D)16=100011012(8D)_{16}=10001101_2.

MSB =1=1 → negative. Magnitude bits 00011012=8+4+1=130001101_2=8+4+1=13.

(8D)1613(8D)_{16}\to-13.

(FF)16(FF)_{16}:

F=11112F=1111_2(FF)16=111111112(FF)_{16}=11111111_2.

MSB =1=1 → negative. Magnitude bits 11111112=1271111111_2=127.

(FF)16127(FF)_{16}\to-127.

Answer

  (8D)16=13,(FF)16=127(sign-magnitude, 8-bit).  \boxed{\;(8D)_{16}=-13,\qquad(FF)_{16}=-127\quad(\text{sign-magnitude, 8-bit}).\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.