Page 21 - Cs_withBlue_J_C11_Flipbook
P. 21

Example 2:  Convert (215.125)  to octal.
                                            10
                 Answer:                   Integer part                                 Fractional part


                              Divisor       Dividend     Remainder        Multiplication     Result      Integer part
                                 8            215                            0.125 x 8      =  1.000         1
                                 8            26             7
                                 8             3             2
                                               0             3

                 (215.25)  = (327.1) 8
                        10
                 1.2.3 Decimal to Hexadecimal
                 The steps to be followed are:
                 1.  Divide the number by 16 and the quotient becomes the new number (dividend).
                 2.  Store the remainder of the division separately.
                 3.  Repeat steps 1 & 2 until new number = 0.
                 4.  Arrange the remainders from the bottom (LSD) to top (MSD) to get the result.
                 5.  For the decimal part, repeat step 6 until the fractional part becomes 0 or till four places after decimal.
                 6.  Multiply the fractional part by 16 and store the integer part of the product separately.
                 7.  Arrange the binary digits of the integer part from top to bottom for the result of the fractional part.
                 A similar procedure as illustrated in decimal to binary conversion is followed with 16.
                 Example 1: Convert (740)  to hexadecimal.
                                       10
                 Answer:                  Integer part


                              Divisor       Dividend     Remainder
                                16            740
                                16            46             4
                                16             2             E
                                               0             2

                 (740)  = (2E4)
                     10       16
                 Example 2: Convert (215.125)  to hexadecimal.
                                           10
                 Answer:                  Integer part                                  Fractional part

                              Divisor      Dividend      Remainder        Multiplication    Result      Integer part
                                16           215
                                                                            0.125 x 16      =  2.0          2
                                16            13             7
                                              0             D

                 (215.25)  = (D7.2) 16
                        10
                 1.2.4 Binary to Decimal
                 The steps to be followed are:
                 1.  Multiply each binary digit with its corresponding 2 place value  starting from right to left (LSB to MSB).
                 2.  Add each product term to get the final result.
                 3.  The place value of the integer part starts from 0 and increases by 1 as we move left.
                 4.  The place value of the fractional part starts from -1 and decreases by 1 as we move right.


                                                                                                                        19
                                                                                                            Numbers     19
   16   17   18   19   20   21   22   23   24   25   26