Page 265 - FUNDAMENTALS OF COMPUTER
P. 265
NPP
NPP Number System, Boolean Algebra and Logic Circuits 265
Thus, the result can be written as AV… n[aUm_ H$mo Bg Vah go {bIm Om gH$Vm h¡…
101011 + 1100110 = 10010001
(ii) The given Binary addition problem is : (ii) Xr JB© g_ñ`m Bg àH$ma h¡ …
0 1 00 10
+ 1 1 1 001
Add column–by–column and take carry to ñV§^m| H$mo Omo‹S>mo VWm hm{gb H$mo AmJo bo OmZo na
the next column, if it is generated. The result is
obtained as follows :
01 0 01 0
+ 1 110 0 1
10 01 01 1
Thus, the result can be written as AV: n[aUm_ {ZåZmZwgma {cI gH$Vo h¢:
0 1 0 0 10 + 1 1 1 0 0 1 = 1 0 0 1 0 11
3.29 Binary Subtraction 3.29 ~mBZar _| KQ>mZm
There may be four cases of subtraction for Xmo {~Q>m| H$mo Mma VarH$m| go KQ>m`m Om gH$Vm h¡,
two bits. Three look exactly identical to our {OZ_| go {ZåZ VrZ Vmo EH$X_ Xe_bd Ho$ g_mZ h¢…
decimal subtraction:
0 – 0 = 0, 1 – 0 = 1, 1– 1 = 0
But what about 0 – 1 ? Since 1 is greater bo{H$Z 0 - 1 H$m Š`m? A~ My±{H$ 1 ~‹S>m h¡ 0
than 0, therefore for subtracting 1 from 0 we go, Bg{bE EH$ CYma boH$a 10 ~ZmZm n‹S>oJm Ÿ& AV…
have to take a borrow so that the 0 will become
10. But 10 is equal to 1 + 1. Therefore we can 10 = 1 + 1 _| go KQ>mZo na 1 ah OmEJm Ÿ& AV…
conclude : 0 – 1 = 1 0 – 1 = 1
put, {10 = 1 + 1 aIZo na }
⇒ 1 + 1 – 1 = 1
Thus, with a Borrow 1 0 – 1 = 1 AV: 1 CYma g{hV
This forth case is very important to re- Bg gyÌ H$mo Ü`mZ aIZm AË`§§V Oê$ar h¡Ÿ& EH$
member, consider the following example : CXmhaU bmo…
1 1 0 – 1 0 1
Now start from right, take 1 as borrow A~ grYo hmW go ewê$ hmoH$a CYma bmo …
11 0
− 10 1
1
Now in both the remaining columns we bo{H$Z ~mH$s Ho$ Xmo ñV§^m| _| 0 - 0 = 0 VWm
put 0 – 0 = 0 and 1 – 1 = 0, to get the result : 1 - 1 = 0 aIZo na …