Page 22 - Cs_withBlue_J_C11_Flipbook
P. 22

Example 1: Convert (11001101)  to decimal.
                                          2
              Answer:     7      6       5      4      3       2      1       0           Place value

                          1      1       0      0      1       1      0       1            Digits

                             7
                                                          3
                                                   4
                                                                        1
                                                                 2
                                     6
                                            5
                      =  1 × 2  + 1 × 2  + 0 × 2  + 0 × 2  + 1 × 2  + 1 × 2  + 0 × 2  + 1 × 2 0
                      =  128 + 64 + 0 + 0 + 8 + 4 + 0 + 1
                      =  (205) 10
              Example 2: Convert (0.01101)  to decimal.
                                         2
              Answer:     0                -1       -2      -3       -4      -5
                          0        .       0        1        1       0        1
                                                    -4
                      =  0 × 2  + 1 × 2  + 1 × 2  + 0 × 2  + 1 × 2 -5
                                             -3
                                     -2
                             -1
                      =  0 + 1/4 + 1/8 + 0 + 1/32
                      =  (0.40625)
                                  10
              1.2.5 Octal to Decimal
              The steps to be followed are:
              1.  Multiply each octal digit with its corresponding 8 place value  starting from right to left (LSB to MSB).
              2.  Add each product term to get the final result.
              3.  Place value of the integer part starts from 0 and increases by 1 as we move left.
              4.  Place value of the fractional part starts from -1 and decreases by 1 as we move right.
              Example 1: Convert (3572)  to decimal.
                                      8
              Answer:     3      2       1      0            Place value

                          3      5       7      2            Digits

                             3
                                     2
                                            1
                      =  3 × 8  + 5 × 8  + 7 × 8  + 2 × 8 0
                      =  1536 + 320 + 56 + 2
                      =  (1914) 10
              Example 2: Convert (0.542)  to decimal.
                                       8
              Answer:      0               -1       -2      -3
                           0       .        5       4        2
                      =  5 × 8  + 4 × 8  + 2 × 8 -3
                             -1
                                     -2
                      =  5 × 1/8 + 4 × 1/64 + 2 × 1/512
                      =  0.625 + 0.0625 + 0.00390
                      =  (0.6914)
                                10
              1.2.6 Hexadecimal to Decimal
              The steps to be followed are:
              1. Multiply each hexadecimal digit with its corresponding 16 place value  starting from right to left (LSD to MSD).
              2.  Add each product term to get the final result.
              3.  Place value of the integer part starts from 0 and increases by 1 as we move left.
              4.  Place value of the fractional part starts from -1 and decreases by 1 as we move right.



                2020  Touchpad Computer Science-XI
   17   18   19   20   21   22   23   24   25   26   27