← 2016 Paper 2

UPSC 2016 Maths Optional Paper 2 Q5d — Step-by-Step Solution

10 marks · Section B

Number systems · Numerical Analysis · asked 7× in 13 yrs · Read the full method →

Question

Convert the following decimal numbers to equivalent binary and hexadecimal numbers:

Technique

Recognise the powers of two (4096=2124096=2^{12}, 2048=2112048=2^{11}, 0.0625=240.0625=2^{-4}) for instant binary; repeated ×2\times2 for the 0.43750.4375 fraction; group binary digits in nibbles of four to read hex directly.

Solution

Method. Integer part: repeated division by 22 (binary) / by 1616 (hex), reading remainders bottom-up. Fractional part: repeated multiplication by 22 / by 1616, reading the integer carries top-down. Each hex digit groups 44 binary digits.

(i) 40964096

4096=2124096=2^{12}, so in binary it is a 11 followed by twelve 00s:

4096=10000000000002212.4096=\underbrace{1\,0000\,0000\,0000_2}_{2^{12}}.

Grouping in fours from the right: 0001 0000 0000 00002=(1)(0)(0)(0)160001\ 0000\ 0000\ 0000_2 = (1)(0)(0)(0)_{16}, i.e. hex 10001000:

  4096=(100000000000)2=(1000)16.  \boxed{\;4096=(1000\,0000\,0000)_2=(1000)_{16}.\;}

(Check: 163=409616^3=4096, so 100016=40961000_{16}=4096. ✓)

(ii) 0.43750.4375

Multiply the fraction by 22 repeatedly, recording carries:

0.4375×2=0.875 (0),0.875×2=1.75 (1),0.75×2=1.5 (1),0.5×2=1.0 (1).0.4375\times2=0.875\ (0),\quad 0.875\times2=1.75\ (1),\quad 0.75\times2=1.5\ (1),\quad 0.5\times2=1.0\ (1).

Reading carries top-down: 0.011120.0111_2. Indeed 14+18+116=0.4375\tfrac14+\tfrac18+\tfrac1{16}=0.4375. For hex, 0.4375×16=7.00.4375\times16=7.0, a single digit 77:

  0.4375=(0.0111)2=(0.7)16.  \boxed{\;0.4375=(0.0111)_2=(0.7)_{16}.\;}

(Consistency: group the binary fraction in fours after the point — 01112=7160111_2=7_{16}. ✓)

(iii) 2048.06252048.0625

Integer part 2048=2112048=2^{11}: a 11 followed by eleven 00s,

2048=(10000000000)2.2048=(100\,0000\,0000)_2.

Fractional part 0.0625=116=240.0625=\tfrac{1}{16}=2^{-4}:

0.0625×2=0.125(0), ×2=0.25(0), ×2=0.5(0), ×2=1.0(1)  0.00012.0.0625\times2=0.125\,(0),\ \times2=0.25\,(0),\ \times2=0.5\,(0),\ \times2=1.0\,(1)\ \Rightarrow\ 0.0001_2.

So 2048.0625=(10000000000.0001)22048.0625=(100\,0000\,0000.0001)_2. Hex. 2048=1628=82562048=16^2\cdot 8=8\cdot256, so integer part =80016=800_{16}; fraction 0.0625×16=1.00.1160.0625\times16=1.0\Rightarrow 0.1_{16}:

Answer

  2048.0625=(10000000000.0001)2=(800.1)16.  \boxed{\;2048.0625=(100\,0000\,0000.0001)_2=(800.1)_{16}.\;}
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.