Page 261 - ARM 64 Bit Assembly Language
P. 261

250 Chapter 8

                  The value of this number in base 10 can be computed by taking the two’s complement, sum-
                  ming the values of the non-zero bits, and adding a negative sign to the result. The two’s com-
                  plement of 1011010101111010 is 0100101010000101 + 1 = 0100101010000110. The value
                  of this number is:


                                        − 2 14−7  + 2 11−7  + 2 9−7  + 2 7−7  + 2 2−7  + 2 1−7

                                            7
                                                     2
                                                          0
                                                 4
                                    =− 2 + 2 + 2 + 2 + 2      −5  + 2 −6

                                                              1    1
                                    =− 128 + 16 + 4 + 1 +       +
                                                             32    64
                                    =−149.046875 10
                  For a final example we will interpret this bit pattern as an S(−5,16). In that format, the layout
                  is:














                  The value of this number in base ten can be computed by taking the two’s complement, sum-
                  ming the values of the non-zero bits, and adding a negative sign to the result. The two’s com-
                  plement is:















                  The value of this number interpreted as an S(−5,16) is:


                         − 2  −6  + 2 −9  + 2 −11  + 2 −13  + 2 −18  + 2 −19  =−0.0181941986083984375
   256   257   258   259   260   261   262   263   264   265   266