← 2023 Paper 2

UPSC 2023 Maths Optional Paper 2 Q5c-ii — Step-by-Step Solution

5 marks · Section B

Algebra of Binary Numbers · Numerical Analysis · asked 2× in 14 yrs · Read the full method →

Question

Evaluate, using the binary arithmetic, the following numbers in their given system: (ii) (7AB.432)16−(5CA.D61)16(7AB.432)_{16}-(5CA.D61)_{16}

Technique

4-bit-per-hex-digit conversion; binary subtraction with borrow propagation; regroup.

Solution

The procedure:

  1. Convert each operand to binary (4 bits per hex digit).
  2. Subtract in binary using the rule ”ai−bi−binia_i-b_i-bin_i; borrow if negative”.
  3. Re-group the binary result into hex.

Step 1 — Convert to binary (4 bits per hex digit):

HexBinaryHexBinaryHexBinary
70111A1010B1011
50101C1100A1010
401003001120010
D11016011010001
(7AB.432)16=0111 1010 1011 . 0100 0011 00102,(7AB.432)_{16}=0111\,1010\,1011\,.\,0100\,0011\,0010_2, (5CA.D61)16=0101 1100 1010 . 1101 0110 00012.(5CA.D61)_{16}=0101\,1100\,1010\,.\,1101\,0110\,0001_2.

Step 2 — Binary subtraction.

Fractional part (positions 2−12^{-1} to 2−122^{-12}, MSB→LSB):

Position2−12^{-1}2−22^{-2}2−32^{-3}2−42^{-4}2−52^{-5}2−62^{-6}2−72^{-7}2−82^{-8}2−92^{-9}2−102^{-10}2−112^{-11}2−122^{-12}
minuend010000110010
subtrahend110101100001
difference011011010001

(Borrow propagates from 2−122^{-12} up. The final borrow out into the integer part is 11.)

Integer part (positions 202^0 to 2112^{11}, LSB→MSB), with borrow-in =1=1 from the fraction:

Position202^0212^1222^2232^3242^4252^5262^6272^7282^8292^92102^{10}2112^{11}
minuend110101011110
subtrahend010100111010
difference000001111000

Integer bits from 2112^{11} down: 0 0 0 1    1 1 1 0    0 0 0 0=0001 1110 000020\,0\,0\,1\;\;1\,1\,1\,0\;\;0\,0\,0\,0=0001\,1110\,0000_2. Fractional bits from 2−12^{-1} down: 0 1 1 0    1 1 0 1    0 0 0 1=0110 1101 000120\,1\,1\,0\;\;1\,1\,0\,1\;\;0\,0\,0\,1=0110\,1101\,0001_2.

Step 3 — Regroup in fours back to hex.

Integer: 0001=1,  1110=E,  0000=0⇒1E00001=1,\;1110=E,\;0000=0\Rightarrow 1E0. Fractional: 0110=6,  1101=D,  0001=1⇒.6D10110=6,\;1101=D,\;0001=1\Rightarrow .6D1.

Answer

  (7AB.432)16−(5CA.D61)16=(1E0.6D1)16.  \boxed{\;(7AB.432)_{16}-(5CA.D61)_{16}=(1E0.6D1)_{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 — 14 years, mapped. Get the take-away PDF free.