Page 288 - FUNDAMENTALS OF COMPUTER
P. 288

288                         Fundamentals of Computers                           NPP


                  Solution:                                   hc:
                      (a) (+32) + (–14)
                                                +32    ⇒     0 0  10 0 0 0 0
                                                –14    ⇒  + 11110 0 10

                                                end       1  0 0 0 1 0 0 1 0
                                                carry
                      Neglect end carry; the result is (+18).     A§{V_ hm{gc H$mo N>mo‹S>Zo na n[aUm_ (+18) AmVm h¡Ÿ&
                      Thus,                         (+32) + (–14) = (+18)
                      (b) (–47) + (–31)
                                                    +47 ⇒      1 1 01 0 0 0 1
                                                                 + 1 1 1 0 0 0 0 1
                                                    -31 ⇒
                                               end carry   1   1 0 1 1 0 0 1 0
                                               (Neglected)
                      Result ⇒                       10110010 = (–78)
                      Thus,           NPP           (–47) + (–31) = (–78)
                       Problem 3.83                                àíZ 3.83
                      Do the  following  using complement         H$m°påßb_|Q> H$s {d{Y go {H«$`m H$amo…
                  method :
                                                    (–1110)  + (–1011) 2
                                                           2
                  Solution:                                   hc:
                      (a) Convert into 7-bits                     _mZ H$mo 7- {~Q> _| ~XbZo na
                                                 (–0001110)  + (–0001011) 2
                                                           2
                      put a 1 for (–) sign and take 2's complement  (-) Ho$ ñWmZ na 1 aIH$a n[a_mU H$s {~Q>m| H$m
                  of the magnitude to
                                                              2's H$m°påßb_|Q> boZo na…
                                                               1 1 11 0 0 1 0
                                                                 +1 1 1 10 1 0 1

                                                           1   1 1 1 0 0 1 1 1

                      Thus, the result is                         AV… n[aUm_ h¡ …
                                                          11100111
                      Since MSB is 1, thus result is negative and  My±{H$ MSB 1 h¡, AV… n[aUm_ F$UmË_H$ h¡ Am¡a
                  is in 2's complement form. Therefore actual result  `h 2's H$m°påßb_|Q> _| h¡ & AV… dmñV{dH$ _mZ BgH$m
                  can be obtained by taking 2's complement of the  nwZ… 2's H$m°påßb_|Q> boZo na hr kmV hmoJmŸ& `h Bg àH$ma
                  sum. Thus the result is –00011001 or –11001  AmEJm- 00011001 `m –11001.

                                               (–1110)  + (–1011)  = (–11001) 2
                                                      2
                                                               2
   283   284   285   286   287   288   289   290   291   292   293