Page 37 - Computer Science Class 11 With Functions
P. 37

Digital computers are based on the binary number system — a system that uses only two digits, 1 and 0, expressed
            by the voltage levels high and low, respectively. As the binary system uses only two digits, it is also called a base-2
            system. Some examples of binary numbers are (1101) , (101.011) , (1101010) , and (10001.001) . The binary number
                                                                                                 2.
                                                           2
                                                                                 2
                                                                      2
            system is also a positional number system. So, the value of a digit in the binary number system depends on its position,
            expressed as a power of 2 because the binary system is a base-2 system. Table 2.3 shows the decimal and its binary
            equivalent. Recall that in the case of the decimal system, the integer and the fraction parts are separated by a decimal
            point. Similarly, in the case of the binary system, the integer and the fraction parts are separated by a binary point. As
            discussed above, while representing the whole numbers in the binary system, the values of digits positions increase
            in powers of the base (2) from right to left. Similarly, for the fractional part, the values of digits decrease in powers of
            the base to the right of the binary point. Table 2.4 shows the digit's place value, face value, and value represented by
            the binary number: (1101.101) .
                                       2
            Binary Number: (1101.101) 2

                                   Table 2.4: Digit's place value, face value, value represented by (1352) .
                                                                                           10
                                                                                                     1
                                                                                           1
                                                                                                                1
                                                                                      -1
                                                                                                 -2
                                            2
                                                       1
                                                                 0
                                                                                                           -3
                                 3
             Digit's place value  2  (=8)  2  (=4)   2  (=2)    2  (=1)              2  (=  )   2  (=  )  2  (=  )
                                                                                           2         4          8
             Binary digit           1          1         0          1          .         1         0          1
             Face value             1          1         0          1          .         1         0          1
             Value  represented   1 × 2 3    1 × 2 2   0 × 2 1    1 × 2 0              1 × 2 -1  0 × 2 -2   1 × 2 -3
             by digit
            Now we are ready to compute the value of (1101.101)  in decimal number system as follows:
                                                            2
                                                  0
                                           1
                                                                 -2
                                                          -1
                             3
                                     2
            (1101.101) = 1 × 2  + 1 × 2  + 0 × 2 + 1 × 2  + 1 × 2 + 0 × 2  + 1 × 2 -3
                     2
                       = 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1 + 1 × 0.5 + 0 × 0.25 + 1 × 0.125
                       = 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125
                       = 13.625
            As the leftmost bit has the highest positional value, it is called the Most Significant Bit (MSB). Similarly, the rightmost
            bit has the least positional value and is called the Least Significant Bit (LSB).
                    Write the 3-bit binary equivalent of the following decimal digits:
                    (i) 7
                    (ii) 2
                    (iii) 9



            2.3 Octal Number System (Base-8)

            The  octal  number  system  (also  called  base  8  number  system),  comprises  eight  distinct  digits:  0,  1,  2,  3,  4,  5,  6
            and  7.  Examples  of  octal  numbers  are  (112.74) ,  (513) ,  and  (714.007) .  The  octal  number  system  provides  a
                                                         8      8              8
            compact representation of binary numbers. A sequence of three bits can take a value from (000)  to (111) . In the
                                                                                                    2        2
            octal system (000)  and (111)  are expressed as (0)  and (7) , respectively. So, an octal digit can be used to represent
                            2         2                  8       8
            a  sequence  of  three  binary  digits  (or  3  bits).  Table  2.5  below  shows  the  decimal  and  binary  equivalent  of  each
            octal digit.










                                                                            Number Systems and Encoding Schemes  35
   32   33   34   35   36   37   38   39   40   41   42