Page 65 - Engineering Digital Design
P. 65

36              CHAPTER 2 / NUMBER SYSTEMS, BINARY ARITHMETIC, AND CODES


                    Thus,

                                               XS3 = BCD + 0011.

                    For example, the number 63.98io is represented in XS3 code as 1001 0110. 1 100 101 1\S3-
                    To convert XS3 to BCD code, 0011 must be subtracted from XS3 code. In 4-bit quan-
                    tities the XS3 code has the useful feature that when two numbers are added together in
                    XS3 notation, a carry will result and yield the correct value any time a carry results in
                    decimal (i.e., when 9 is exceeded). This feature is not shared by either binary or BCD
                    addition.


                    2.4.2  The Hexadecimal and Octal Systems
                    The hexadecimal number system requires that r = 16 in Eqs. (2.1) and (2.2), indicating
                    that there are 16 distinguishable characters in the system. By convention, the permissible
                    hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F for decimals 0
                    through 15, respectively. Examples of the positional and polynomial representations for a
                    hexadecimal number are




                                       = (AF3-C8) 16
                    with a decimal value of





                                         2
                                 = 10 x 16  + 15 x 16' + 3 x 16° + 12 x 16"' + 8 x 16~ 2
                                 = 2803.78125 10.

                    Here, it is seen that a hexadecimal number has been converted to decimal by using Eq. (2.2).
                      The octal number system requires that r = 8 in Eqs. (2.1) and (2.2), indicating that there
                    are eight distinguishable characters in this system. The permissible octal digits are 0, 1,2,
                    3, 4, 5, 6, and 7, as one might expect. Examples of the application of Eqs. (2.1) and (2.2) are


                                      N 8 = (<?„_, • --020100 -O-iQ-20-3 • • -0_ m ) 8
                                         = 501.74 8,

                    with a decimal value of





                                           2       1               1        2
                                       5 x 8  + 0 x 8  + 1 x 8° + 7 x 8"  + 4 x 8~
                                       321.9375,0-
   60   61   62   63   64   65   66   67   68   69   70