Page 162 - FUNDAMENTALS OF COMPUTER
P. 162
162 Fundamentals of Computers NPP
Hexadecimal to Binary Conversion hoŠgmS>o{g_b go ~mBZar _| n[adV©Z
The process of conversion from hoŠgmS>o{g_b H$mo Xmo àH$ma go ~mBZar _| n[ad{V©V
hexadecimal to Binary can also be performed {H$`m Om gH$Vm h¡ Ÿ& EH$ VarH$m Vmo `h h¡ {H$ nhbo
in two ways one way to convert the given
hexadecimal number in Decimal and convert hoŠgmS>o{g_b H$mo Xe_bd _| ~Xbmo VWm Bg Xe_bd Ho$
the decimal into Binary. But this is a very ñWmZ na A~ ~mBZar àmá H$amo Ÿ& `h {d{Y ~hþV hr b§~r h¡
lengthy process. Š`m|{H$ Bg_| Xmo ~ma JUZmE± H$aZm hm|JrŸ&
There is a direct method of conversion, It EH$ Xygar {d{Y go h_ grYo-grYo hoŠgmS>o{g_b g§»`m
is exactly similar to octal to binary conversion H$mo ~mBZar _| ~Xb gH$Vo h¢ Ÿ& `h {d{Y Am°ŠQ>b go ~mBZar
except that 4-bits are used here. Memorise Table n[adV©Z Ho$ EH$X_ g_mZ h¡ Ÿ& `hm± na 4-{~Q>m| _| Vwë`
3.3. The following examples will illustrate the aIZm hm|Jo Ÿ& Q>o~b 3.3 H$mo AÀN>o go `mX H$a b|Ÿ& ZrMo
process:
{bI| CXmhaUm| go Bgo AmgmZr go g_Pm Om gH$Vm h¡…
Problem 3.20 àíZ 3.20
Convert following hexadecimal numbers hoŠgmS>o{g_b g§»`mAm| H$mo ~mBZar _| n[ad{V©V
into binary. NPP H$s{OE …
(a) (42.61) 16 (b) (3A. 42) 16 (c) (3F21) 16 (d) (101.2C) 16
Octal to Hexadecimal Conversion Am°ŠQ>b go hoŠgmS>o{g_b _| n[adV©Z
One way of converting octal number into Bg g_ñ`m H$mo ^r Xmo àH$ma go hb {H$`m Om gH$Vm
hexadecimal is to first convert the octal number h¡ Ÿ& EH$ VarH$m Vmo `h h¡ {H$ Xr JB© Am°ŠQ>b g§»`m H$mo
into decimal and then convert the decimal Xe_bd _| ~Xbmo Am¡a àmá Xe_bd g§»`m H$mo
number obtained into hexadecimal. But this is hoŠgmS>o{g_b _| ~Xbmo Ÿ& bo{H$Z `h {d{Y ~hþV b§~r h¡
a very lengthy and cumbersome process. The Am¡a Bg_| Xmo ~ma ~‹S>r-~‹S>r JUZmE± H$aZm n‹S>Vr h¢ Ÿ&
easy way of converting octal to hexadecimal is
to first find the binary equivalent by putting 3 Xygar {d{Y ~hþV hr gab h¡ Ÿ& Bg_| nhbo Am°ŠQ>b g§»`m
- bit binary number for each octal digit. Then H$mo 3-{~Q>m| H$s ghm`Vm go ~mBZar _| H$amo VWm Bg
convert the binary number obtained into ~mBZar Ho$ Mma-Mma {~Q>m| _| g_yh ~ZmH$a BZHo$ ñWmZ
hexadecimal by making groups of four bits. In na hoŠgmS>o{g_b _| A§H$ {bI {X`o OmVo h¢ Ÿ& AV… {d{Y
the second method no calculation is needed. _| {H$gr àH$ma H$s JUZm Zht H$aZm n‹S>Vr h¡ Ÿ& ZrMo {bIo
Consider the following examples: CXmhaUm| H$mo g_Pmo …
Problem 3.21 àíZ 3.21
Convert following octal numbers into hoŠgmS>o{g_b _| ~Xbmo …
hexadecimal:
Solution : hc :
(a) first find the Binary equivalent of (425) 8 (a) (425) Ho$ VrZm| A§H$m| Ho$ ñWmZ na 3-{~Q> _|
8
by putting 3-bit Binary Number for each digit: ~mBZar g§»`mE± aIm| …
(100 010 101 )
2