← 2026 Paper 2

UPSC 2026 Maths Optional Paper 2 Q6b-i — Step-by-Step Solution

8 marks · Section B

Representation of Integers, Signed Integers, and Reals (incl. Double Precision) · Numerical Analysis · asked 2× in 14 yrs · Read the full method →

Question

Find the decimal equivalent of the following floating point 10-bit numbers with 5 bits as fractional part:

1010111011and01001010101010111011 \quad\text{and}\quad 0100101010

Technique

“10 bits with 5 bits as fractional part” fixes the position of the binary point: 5 integer bits, then the point, then 5 fractional bits. That is a fixed-point word (a Q5.5Q5.5 format), so the value is just the positional sum ∑bi2i\sum b_i 2^{i} with ii running from +4+4 down to −5-5 — equivalently, read all ten bits as one unsigned integer NN and divide by 25=322^{5}=32. The only judgement the question demands is whether the leading bit is a sign bit; nothing in the wording says it is, so read the words unsigned, and say so.

Solution

Step 1 — Fix the format explicitly before computing anything.

A 10-bit word b4b3b2b1b0 ∙ b−1b−2b−3b−4b−5b_4b_3b_2b_1b_0\,\bullet\,b_{-1}b_{-2}b_{-3}b_{-4}b_{-5} with 5 fractional bits has value

val=∑i=−54bi 2 i=b424+b323+b222+b121+b020⏟integer part  +  b−12−1+b−22−2+b−32−3+b−42−4+b−52−5⏟fractional part.(1)\text{val}=\sum_{i=-5}^{4} b_i\,2^{\,i} = \underbrace{b_42^4+b_32^3+b_22^2+b_12^1+b_02^0}_{\text{integer part}} \;+\;\underbrace{b_{-1}2^{-1}+b_{-2}2^{-2}+b_{-3}2^{-3}+b_{-4}2^{-4}+b_{-5}2^{-5}}_{\text{fractional part}} . \tag{1}

Weights, written out once and reused:

24,23,22,21,20  =  16,  8,  4,  2,  1;2−1,2−2,2−3,2−4,2−5  =  0.5,  0.25,  0.125,  0.0625,  0.03125.2^4,2^3,2^2,2^1,2^0\;=\;16,\;8,\;4,\;2,\;1;\qquad 2^{-1},2^{-2},2^{-3},2^{-4},2^{-5}\;=\;0.5,\;0.25,\;0.125,\;0.0625,\;0.03125 .

Equivalently, and this is the fastest reliable route under exam pressure:

val=N25=N32,N=the whole 10-bit string read as a plain binary integer,(2)\text{val}=\frac{N}{2^{5}}=\frac{N}{32},\qquad N=\text{the whole 10-bit string read as a plain binary integer}, \tag{2}

because inserting a binary point five places from the right is exactly a division by 252^5. Formula (2) also gives a free arithmetic check on (1).

Convention actually used: the word is read as unsigned. The question describes only a bit-count and the position of the point — it names no sign bit, no bias and no exponent field — so an unsigned fixed-point reading is the one the wording supports. (The signed readings are tabulated in Step 4, for completeness.)

Step 2 — First number, 10101110111010111011.

Split five and five:

1010111011  ⟶  10101⏟integer  ∙  11011⏟fraction.1010111011\;\longrightarrow\;\underbrace{10101}_{\text{integer}}\;\bullet\;\underbrace{11011}_{\text{fraction}} .

Integer part:

(10101)2=1⋅16+0⋅8+1⋅4+0⋅2+1⋅1=16+4+1=21.(10101)_2=1\cdot16+0\cdot8+1\cdot4+0\cdot2+1\cdot1=16+4+1=21 .

Fractional part:

(0.11011)2=1⋅12+1⋅14+0⋅18+1⋅116+1⋅132=16+8+0+2+132=2732=0.84375.(0.11011)_2=1\cdot\tfrac12+1\cdot\tfrac14+0\cdot\tfrac18+1\cdot\tfrac1{16}+1\cdot\tfrac1{32} =\frac{16+8+0+2+1}{32}=\frac{27}{32}=0.84375 .

Hence

(1010111011)  in Q5.5  =  21+0.84375  =  21.84375.(1010111011)\;\text{in }Q5.5\;=\;21+0.84375\;=\;21.84375 .

Check by (2). As a plain integer,

(1010111011)2=512+128+32+16+8+2+1=699,69932=21.84375.  ✓(1010111011)_2=512+128+32+16+8+2+1=699,\qquad \frac{699}{32}=21.84375 . \;\checkmark

Step 3 — Second number, 01001010100100101010.

0100101010  ⟶  01001⏟integer  ∙  01010⏟fraction.0100101010\;\longrightarrow\;\underbrace{01001}_{\text{integer}}\;\bullet\;\underbrace{01010}_{\text{fraction}} .

Integer part:

(01001)2=0⋅16+1⋅8+0⋅4+0⋅2+1⋅1=8+1=9.(01001)_2=0\cdot16+1\cdot8+0\cdot4+0\cdot2+1\cdot1=8+1=9 .

Fractional part:

(0.01010)2=0⋅12+1⋅14+0⋅18+1⋅116+0⋅132=0+8+0+2+032=1032=516=0.3125.(0.01010)_2=0\cdot\tfrac12+1\cdot\tfrac14+0\cdot\tfrac18+1\cdot\tfrac1{16}+0\cdot\tfrac1{32} =\frac{0+8+0+2+0}{32}=\frac{10}{32}=\frac{5}{16}=0.3125 .

Hence

(0100101010)  in Q5.5  =  9+0.3125  =  9.3125.(0100101010)\;\text{in }Q5.5\;=\;9+0.3125\;=\;9.3125 .

Check by (2). As a plain integer,

(0100101010)2=256+32+8+2=298,29832=9.3125.  ✓(0100101010)_2=256+32+8+2=298,\qquad \frac{298}{32}=9.3125 . \;\checkmark

Both values are exact — every Q5.5Q5.5 word is an exact multiple of 2−5=0.031252^{-5}=0.03125, so a terminating decimal with at most five places is guaranteed, and any answer with a recurring tail is wrong by construction. That is a useful sanity rule to state.

Step 4 — The signed readings, stated as labelled alternatives (not as hedging).

The second word begins with 00, so it is positive under every one of the standard conventions and equals 9.31259.3125 in all of them. Only the first word, which begins with 11, is convention-sensitive:

Reading of 10101110111010111011Value
Unsigned Q5.5Q5.5 (the reading used above)69932=21.84375\dfrac{699}{32}=\mathbf{21.84375}
Sign–magnitude: b9b_9 = sign, remaining nine bits =(010111011)= (010111011) with the same point position−699−51232=−18732=−5.84375-\dfrac{699-512}{32}=-\dfrac{187}{32}=-5.84375
Two’s complement with the same scaling 2−52^{-5}699−102432=−32532=−10.15625\dfrac{699-1024}{32}=-\dfrac{325}{32}=-10.15625

Which a marker expects: 21.8437521.84375. The question supplies exactly one piece of format information — where the binary point sits — and supplies it for both numbers alike; had a sign bit been intended, the effective integer field would be 4 bits, not 5, and the phrase “5 bits as fractional part” would no longer determine the layout. Moreover the second number is deliberately chosen with a leading 00, so that it reads the same either way — the paper is testing positional weighting, not two’s-complement arithmetic. The unsigned values are therefore given as the answer, with the alternatives recorded above so that the reading is a stated decision rather than an accident. ■\qquad\blacksquare

Answer

  (1010111011)Q5.5=(10101.11011)2=69932=21.84375,(0100101010)Q5.5=(01001.01010)2=29832=9.3125  \boxed{\;(1010111011)_{Q5.5}=(10101.11011)_2=\frac{699}{32}=21.84375,\qquad (0100101010)_{Q5.5}=(01001.01010)_2=\frac{298}{32}=9.3125\;}
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 — 14 years, mapped. Get the take-away PDF free.