Page 266 - FUNDAMENTALS OF COMPUTER
P. 266
NPP
266 Fundamentals of Computers NPP
1 10
− 10 1
+ 001
Since No borrow is needed at the end, the My±{H$ A§V _| {H$gr CYma H$s Oê$aV Zht n‹S> ahr
difference is positive. Thus we can write the h¡, AV… A§Va YZmË_H$ hmoJm …
result as:
110 – 101 = + 001
Sometimes a borrow may be needed at the H$^r-H$^r A§{V_ ñV§^ _| KQ>mVo dŠV CYma boZo
last column. In that case the difference is nega- H$s Amdí`H$Vm hmo gH$Vr h¡Ÿ& Bg pñW{V _| CÎma
tive and for that we will have to subtract upper F$UmË_H$ hmoJmŸ& Bg{bE D$nar g§»`m H$mo {ZMbr _| go
number from lower number. Consider the fol-
lowing problem: KQ>mZm n‹S>oJmŸ& {ZåZ g_ñ`m H$mo g_Pmo …
Problem 3.76 àíZ 3.76
Perform the following Binary Subtraction: {ZåZ H$mo KQ>mAmo …
1 0 1 – 1 1 1
Solution: hc:
As we start subtracting we will need a `{X h_ {ZMbr g§»`m H$mo D$nar g§»`m _| go KQ>mVo
borrow at the end. Therefore the lower number h¢ Vmo A§V _| CYma H$s Amdí`H$Vm n‹S>Vr h¡Ÿ& Bg pñW{V
is greater than upper and the difference is nega- _| CÎma F$UmË_H$ hmoJm Am¡a D$nar g§»`m H$mo {ZMbr
tive. Thus, write the same as : g§»`m _| go KQ>mZm n‹S>oJm …
− 11 1
10 1
Now subtracting 101 from 111 and putting A~ 101 H$mo 111 _| go KQ>mAmo VWm (-) H$m {MÝh
negative sign: bJmAmo…
− 1 11
10 1
− 0 10
But above method of subtraction is never co{H$Z CnamoŠV {d{Y H$m Cn`moJ H§$ß`yQ>a _| H$^r
used in computers. It uses a special subtraction ^r Zht {H$`m OmVm h¡Ÿ& H§$ß`yQ>a EH$ {deof àH$ma H$s
method called 2’s complement method. KQ>mZo H$s {d{Y H$m Cn`moJ H$aVm h¡Ÿ& Bgo 2's H$m°påßb_|Q>
{d{Y H$hVo h¢Ÿ& Bgo h_ AmJo n‹S>|JoŸ&
Problem 3.77 àíZ 3.77
Subtract the binary number 11010 from ~mBZar g§»`m 11101 _| go 11011 H$mo
11101.
KQ>mAmoŸ&
Solution: hc:
Considering the four rules, the subtrac- Mmam| gyÌm| H$s ghm`Vm go KQ>mAmo…
tion can be performed as: