Page 42 - Computer Science V2.0 Class 11
P. 42

Table 2.5: Decimal and Binary equivalent of Octal Digits.
                                                             Decimal       Binary representation
                                          Octal digit
                                                          representation         (3 bits)
                                              0                 0                  000
                                              1                 1                  001
                                              2                 2                  010

                                              3                 3                  011
                                              4                 4                  100
                                              5                 5                  101
                                              6                 6                  110
                                              7                 7                  111

              The octal number system is also a positional number system. Therefore, each octal digit in an octal number is expressed
              as the sum of products of its digits' place values and their face values symbol value. For fractional numbers, the values
              of digits on the left side of the radix point (octal point) are expressed as positive powers of eight, while values of digits
              on the right side of the radix point are represented as negative powers of eight.

              Table 2.6 shows the digit's place value, face value, and value represented by an octal number (307.24) .
                                                                                                         8
                                     Table 2.6: Digit's place value, face value, value represented by (307.24) .
                                                                                              8
                                                                                              1
                                                                    0
                                                                                         -1
                                           2
                                                                                                      -2
                                                        1
                      Digit's place value  8  (=64)    8  (=8)     8  (=1)              8  (=  )     8  (=   1  )
                                                                                              8           64
                      Octal digit            3           0           7           .          2           4
                      Face value             3           0           7           .          2           4
                      Value  represented   3 × 8 2     0 × 8 1     7 × 8 0               2 × 8 -1     4 × 8 -2
                      by digit
              The decimal value of (307.24) can be calculated as follows:
                                        8
                  (307.24) 8
                                            -1
                       2
                              1
                                     0
                  =3 × 8 + 0 × 8 + 7 × 8 + 2 × 8  + 4 × 8 -2
                  =3 × 64 + 0 × 8 + 7 × 1 + 0.25 + 0.0625
                  =192 + 7 + 0.25 + 0.0625
                  =199.3125

              2.4 Hexadecimal Number System (Base-16)

              The hexadecimal number system (also called the base 16 number system) comprises sixteen distinct digits: 0, 1, 2, 3,
              4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. While digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 in the hexadecimal system have the same
              meaning as the respective digits in the decimal system, the symbols A, B, C, D, E, and F denote the numbers ten, eleven,
              twelve, thirteen, fourteen, and fifteen, respectively. Hexadecimal numbers and digits are also called hex numbers and
              hex digits, respectively. The hexadecimal number system is also a positional number system. Examples of hexadecimal
              numbers are (AB8.6F) , (DAF) , and (D9F.B6C) . Like the octal number system, the hexadecimal number system also
                                 16      16             16
              provides a compact representation of binary numbers. A sequence of four bits can take a value from (0000)  to (1111) .
                                                                                                            2        2
              In the hexadecimal system (0000)  and (1111) , are expressed as (0)  and (F) , respectively. So, a hex digit can be
                                             2          2                   16       16
              used to represent a sequence of four binary digits (or four bits). Table 2.7 below shows the decimal, octal, and binary
              equivalent of each hexadecimal digit.






                28   Touchpad Computer Science (Ver. 2.0)-XI
   37   38   39   40   41   42   43   44   45   46   47