← 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 13 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 ”aibibinia_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=011110101011.0100001100102,(7AB.432)_{16}=0111\,1010\,1011\,.\,0100\,0011\,0010_2, (5CA.D61)16=010111001010.1101011000012.(5CA.D61)_{16}=0101\,1100\,1010\,.\,1101\,0110\,0001_2.

Step 2 — Binary subtraction.

Fractional part (positions 212^{-1} to 2122^{-12}, MSB→LSB):

Position212^{-1}222^{-2}232^{-3}242^{-4}252^{-5}262^{-6}272^{-7}282^{-8}292^{-9}2102^{-10}2112^{-11}2122^{-12}
minuend010000110010
subtrahend110101100001
difference011011010001

(Borrow propagates from 2122^{-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: 0001    1110    0000=00011110000020\,0\,0\,1\;\;1\,1\,1\,0\;\;0\,0\,0\,0=0001\,1110\,0000_2. Fractional bits from 212^{-1} down: 0110    1101    0001=01101101000120\,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=01E00001=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 — 13 years, mapped. Get the take-away PDF free.