Page 279 - FUNDAMENTALS OF COMPUTER
P. 279

NPP













                  NPP               Number System, Boolean Algebra and Logic Circuits              279









                                                     10's















                                       10's














                   3.33 1’s and 2’s Complement                3.33 1’s VWm 2’s H$m°påßb_|Q>
                      1’s complement: 1’s complement of a         1’s H$m°påßb_|Q>… {H$gr Xr JB© ~mBZar g§»`m Ho$ àË`oH$
                  binary number is a Binary number obtained   {~Q> H$mo CëQ>m H$aZo na Omo ~mBZar g§»`m àmá hmoVr h¡
                  after complementing  each bit. Suppose      Cgo nhbr H$m 1’s H$m°påßb_|Q> H$hVo h¡ Ÿ& O¡go EH$ 4-{~Q>
                  A  A A A  is a 4-bit binary number. Its 1’s  ~mBZar g§»`m  A A A A  H$m  1’s H$m°påßb_|Q> h¡Ÿ:
                         1
                       2
                           0
                    3
                  complement is  A A AA .  For example                      3  2  1  0
                                      2
                                    3
                                            0
                                         1
                  1’s complement of 1010 is 0101.             A 3 A 2  A 1 A 0 . CXmhaU Ho$ {bE, 1010 H$m 1’s H$m°påßb_|Q>
                                                              0101 h¡ Ÿ&
                      2’s Complement : 2’s complement can be      2’s H$m°påßb_|Q> … {H$gr g§»`m Ho$ 1’s H$m°påßb_|Q> H$mo
                  found after  incrementing 1’s  complement by  EH$ go ~‹T>mZo na 2’s H$m°påßb_|Q> àmá hmoVm h¡ AV…
                  one. Thus
                      2’s complement = 1’s complement + 1         2’s H$m°påßb_|Q> = 1’s H$m°påßb_|Q> + 1
                      Take one example to find 2’s complement     h_ Bgo EH$ CXmhaU go g_PVo h¢…
                  of a binary number.
                      Given number = 1110, 1’s complement = 0001  Xr JB© g§»`m =1110, 1’s H$m°påßb_|Q>  = 0001
                      2’s complement = 0001 + 1  = 0010           2’s H$m°påßb_|Q> = 0001 + 1 = 0010
   274   275   276   277   278   279   280   281   282   283   284