Page 72 - Engineering Digital Design
P. 72

2.6 SIGNED BINARY NUMBERS                                             43



                                    0.464 x 2 0.928 0
                                    0.928 x 2 0.856 1
                                    0.856x2 0.712 1
                                    0.712x2 0.424 1 0.654 10 = 0.10100111 2
                                    0.424 x 2 0.848 0 £ max = 2~ 8
                 EXAMPLE 2.8 0.654i 0 ->• W 8 terminated at 4 digits:

                           •N s xr   F    I
                         0.654 x 8 0.232 5
                         0.232 x 8 0.856 1 0.654 10 = 0.5166 8
                         0.856x8 0.848 6 with error bounds
                                                          4
                                                                      3
                         0.848 x 8 0.784 6 0 < e < 7 x 8~  = 1.71 x 10~  by Eq. (2.9)
                 EXAMPLE 2.9  Let 0.5166 8 -»• N 2 be rounded to 8 bits and let 0.5166 8 ->• N\Q be rounded
                 to 4 decimal places:

                                                    2
                                           1
                                                             3
                             0.5166 8 = 5 x 8"  + 1 x 8~  + 6 x 8~  + 6 x 8~ 4
                                    = 0.625000 + 0.015625 + 0.011718 + 0.001465
                                    = 0.6538io rounded to 4 decimal places; e 10 < 10~ 4

                        •N s x r  F     I
                     0.6538 x 2 0.3076 1
                     0.3076 x 2 0.6152 0
                     0.6152 x 2 0.2304 1
                     0.2304 x 2 0.4608 0
                     0.4608 x 2 0.9216 0
                     0.9216 x 2 0.8432 1
                     0.8432 x 2 0.6864 1
                     0.6864 x 2 0.3728 1 0.5166 8 = 0.10100111 2 (compare with Example 2.7)
                                                        8
                                                   4
                     0.3728 x 2 0.7457 0 e 10 < 10~  + 2~  = 0.0040
                 EXAMPLE 2.10 0.10100111 2 -» WBCH
                                                   •A    1
                                     0.10100111 2 =0.1010 0111 =O.A7 BC H




                 2.6 SIGNED BINARY NUMBERS

                 To this point only unsigned numbers (assumed to be positive) have been considered. How-
                 ever, both positive and negative numbers must be used in computers. Several schemes have
                 been devised for dealing with negative numbers in computers, but only four are commonly
                 used:

                    • Signed-magnitude representation
                    • Radix complement representation
   67   68   69   70   71   72   73   74   75   76   77