Page 34 - DCAP101_BASIC_COMPUTER_SKILLS
P. 34

Unit 2: Introduction to Data Representations




                               Step 2: Convert 209   to base 4                                         Notes
                                                10
                                           4  209       Remainder
                                              52            1

                                              13            0
                                              3             1
                                              0             3

                               209 = 3101
                                  10     4
                               Therefore, 545 =209 =3101
                                           6    10    4
                               Hence, 546 =3101
                                        6     4
                 Above example illustrates the method of converting a binary number to an octal number.
                 Shortcut method for binary to octal Conversion. The following steps are used in this method:
                 Step 1: Divide the binary digits into groups of three (starting from the right).

                 Step 2: Convert each group of three binary digit to one octal digit. Since there are only 8
                                                          3
                 digits (0 to 7) in octal number system, 3 bits (2 = 8) are sufficient to represent any octal
                 number in binary to decimal conversion method in this step.

                               101110 =?
                                     2   8
                               Step 1:  Divide the binary digits into groups of 3, starting the right (LSD).
                                       101    110
                               Step 2: Convert each group into one digit of octal (use binary- to- decimal
                               conversion method).

                                                        1
                                                 2
                                                                                   1
                                                                             2
                                      101  = 1 x 2 + 0 x 2 + 1 x 2 0  110 = 1 x 2 +1 x 2 + 0 x 2 0
                                        2                             2
                                           = 4 + 0 + 1              4 + 2 + 0
                                           = 5                      6
                                             8                       8
                               Hence, 101110 = 56
                                           2    8
                 2.2.4 Shortcut Method for Octal to Binary Conversion
                 The following steps are used in this method:
                 Step 1: Convert each octal digit to a 3 digit binary number (the octal digits may be treated
                        as decimal numbers for this conversion).
                 Step 2: Combine all the resulting binary groups (of 3 digits each) into a single binary
                        number.


                               562 = ?
                                  8    2
                               Step 1: Convert each octal digit to 3 Binary digits.
                               5 = 101
                                8     2
                               6  =  110
                                8      2
                               2 – 010
                                8     2





                                                   LOVELY PROFESSIONAL UNIVERSITY                                   27
   29   30   31   32   33   34   35   36   37   38   39