Page 150 - FUNDAMENTALS OF COMPUTER
P. 150
NPP
150 Fundamentals of Computers NPP
Decimal to Hexadecimal Conversion Xe_bd go hoŠgmS>o{g_b H$Z²de©Z
A given decimal number can be converted {H$gr Xe_bd g§»`m H$mo hoŠgmS>o{g_b g§»`m _|
to Hexadecimal number using the procedure
described in table 3.4. Here the base r = 16 is ~XbZo Ho$ {bE `m Vmo 16 go ^mJ XoVo h¢ `m JwUm H$aVo h¢,
used for division and multiplication purpose. O¡gm {H$ Vm{cH$m 3.4 _| g_Pm`m J`m h¡ Ÿ& `hm§ `mX
One important thing to be remembered here is aIZo `mo½` _hËdnyU© ~mV `h h¡ {H$ ^mJ XoZo na eof\$b
that if a remainder is 10 write A, if it is 11 write `m JwUm H$aZo na nyUmªH$ `{X 10 àmá N>moQ>m h¢ Vmo Bgo A
B and so on. Remainder is always a single digit
number. Following examples will show the {bI|, 11 Vmo B {bIo , Eogm 15 VH$ {H$`m Om gH$Vm h¡,
greater details : {Ogo F {bI| Ÿ& eof’$b Ho$db EH$ A§H$ hmoJm&
Problem 3.9 àíZ 3.9
Convert following decimal numbers into hoŠgmS>o{g_b _| ~X{bE …
Hexadecimal:
(a) 125 (b) 95 (c) 0.23 (d) 49.31
Solution : hc :
(a) The given decimal number 125 is an (a) Xr JB© g§»`m 125 EH$ nyUmªH$ h¡ Ÿ& AV… Bgo
Integer. Therefore divide it by 16, write
remainders and read upward : 16 go ^mJ Xmo, eof\$b {bImo d D$na H$s Amoa n‹T>mo …
16 125 D
16 7 7
0
Thus, (125) = (7D) 16
10
(b) The Hexadecimal number can be (b) BgH$m hoŠgmS>ogr_b Bg Vah go àmá {H$`m Om
obtained as follows: gH$Vm h¡:
16 95 F
16 5 5
0
Thus, (95) = (5F) 16
10
(c) The given decimal number 0.23 is a (c) 0.23 EH$ Am§{eH$ g§»`m h¡ Ÿ& Bgr{bE Bgo 16
fraction. Therefore we will multiply by 16, and go JwUm H$a|Jo& nyUmªH$ {bI|Jo VWm D$na go ZrMo n‹T>|Jo:
write integer parts. Read downward:
.23 × 16 = 3.68 3
.68 × 16 = 10.88 A
.88 × 16 = 14.08 E
Thus, (.23) = (.3AE) 16
10
(d) The given decimal number 49.31 is a (d) 49.31 EH$ {_{lV g§»`m h¡Ÿ& AV… nyUmªH$ 49
mixed number containing integer as well as VWm A§e 0.31 hoVw AbJ-AbJ H$ÝdO©Z H$a|Jo…
fractional parts. Now consider each part
separately :