Page 146 - FUNDAMENTALS OF COMPUTER
P. 146
NPP
146 Fundamentals of Computers NPP
The generalised procedure shown in the Omo {d{Y Q>o~b _| Xem©B© JB© h¡, BgH$m Cn`moJ r Ho$
table can be applied to one of the following {d{^ÝZ _mZm| Ho$ {bE ZrMo {bIo H$ÝdO©Z H$aZo hoVw {H$`m
conversions:
OmVm h¡…
Decimal to Binary (r = 2), to octal (r = 8), to Xe_bd go ~mBZar (r = 2) , go Am°ŠQ>b (r = 8), go
Hexadecimal (r = 16)
hoŠgmS>o{g_b (r = 16)
Consider the above conversion one by one A~ h_ BÝh| EH$ - EH$ H$aHo$ CXmhaUm| H$s ghm`Vm
with examples.
go g_P|Jo Ÿ&
Decimal to Binary Conversion Xe_bd go ~mBZar H$ÝdO©Z
The base of the Binary number system is `{X nyUmªH$ Xe_bd g§»`m Xr JB© h¡ VWm Bgo ~mBZar
2. Therefore for integer part of decimal number, _| ~XbZm h¡ Vmo h_ Bgo 2 go ^mJ X|Jo Ÿ& eof\$bm| H$mo
we have to divide it by 2, write remainder and
read the remainders upward, when the grYo hmW H$s Va\$ {bI|Jo Ÿ& Eogm V~ VH$ H$a|Jo V~ VH$
quotient becomes zero. This can be easily ex- {H$ ^mJ\$b eyÝ` Zht hmo OmVm Ÿ& A§V _| eof\$bm| H$mo
plained by taking an example: ZrMo go D$na n‹T>H$a ~mBZar g§»`m àmá H$a|Jo Ÿ& Bgo h_
EH$ CXmhaU boH$a g_PVo h¢ …
Problem 3.5 àíZ 3.5
Convert decimal 14 into Binary Number. Xe_bd g§»`m 14 H$mo ~mBZar g§»`m _| ~Xbmo
Solution : hc :
Apply the procedure shown in the table Vm{cH$m 3.4 Xem©B© JB© {d{Y H$m Cn`moJ H$aZo na
3.4 divide by 2, write Remainders : 14 H$mo Xmo go ^mJ Xmo Am¡a eof\$b {bImo …
2 14 0
2 7 1
2 3 1
2 1 1
0
Now read all the remainders upward. We A~ eof\$bm| H$mo ZrMo go D$na n‹T>mo Ÿ& h_| 1110
get, 1110. This is the desired binary number. àmßV hþAm h¡Ÿ& `h dm§{N>V ~m`Zar g§»`m h¡Ÿ& AV… h_
Thus we can write: (14) = (1110) 2 {bI gH$Vo h¢ … (14) = (1110) 2
10
10
For fraction parts we have to multiply the Am§{eH$ {hñgo hoVw h_| 2 go JwUm H$aZm hmoJm Ÿ& nyUmªH$
given decimal number by 2, write the integer dmbo {hñgo H$mo grYo hmW H$s Va\$ {bIZm hmoJm VWm A§V
part in the right side and read downward. This
can be easily explained by an example : _| nyUmªH$m| H$mo D$na go ZrMo n‹T>Zm hmoJm Ÿ& Bgo h_ EH$
CXmhaU H$s ghm`Vm go AmgmZr go g_P gH$Vo h¢Ÿ&
Problem 3.6 àíZ 3.6
Convert following decimal numbers into Xe_bd g§»`mAm| H$mo ~mBZar _| ~Xbmo&
binary