Page 95 - Bebop to The Boolean Boogie An Unconventional Guide to Electronics Fundamentals, Components, and Processes
P. 95

76 w  Chapter Eight

                closer investigation reveals that each bit pattern is in fact the twos complement
                of the other! To put this another way, taking the twos complement of a positive
                signed binary value returns its negative equivalent and vice versa.
                    The end result is that using signed binary numbers greatly reduces the
                complexity of operations within a computer. To illustrate why this is so, first
                consider one of the simplest operations, that of addition. Compare the additions
                of positive and negative decimal values in sign-magnitude form with their
                signed binary counterparts (Figure 8-10).
                    Examine the standard decimal calculations on the left. The one at the top
                is easy to understand because it’s a straightforward addition of two positive
                values. However, even though you are familiar with decimal addition, you
                probably found the other three a little harder because you had to decide
                exactly what to do with the negative values. By comparison, the signed binary


                               Decimal sign-                 Signed binary
                                magnitude
                                  57                  00111001
                              +   30              ‘+00011110
                              =  07                   01010111




                                  57                  00111001
                              +  -3  0             +11100010
                              =   27                  00011011



                                 -5  7                11000111
                              +   30               +00011110

                              =  -2  7                11100101



                                 -5  7                11000111
                              +  -3  0             +11100010
                              =  -0  7                10101001


                                 Figure 8-1 0. Comparison of sign-magnitude
                                       versus signed binary additions
   90   91   92   93   94   95   96   97   98   99   100