Page 13 - TP_Prime_V2.2_Class7
P. 13

Octal to Decimal Conversion

                 Similar to binary number, you can convert an octal number into decimal number by multiplying
                 each digit of the number with the increasing powers of 8 starting from right-hand side.

                 For example,
                 Example 1: Convert (37)  into decimal.                Example 2: Convert (467)  into decimal.
                                                                                                 8
                                          8
                                     1
                                             0
                     (37)     = 3 × 8  + 7 × 8                         (467)   = 4 × 8² + 6 × 8¹ + 7 × 8 0
                                                                            8
                         8
                              = 24 + 7                                         = 4 × 64 + 6 × 8 + 7 × 1
                     (37)     = (31)                                   (467)   = (311) 10                                   NUMBER SYSTEM
                                    10
                                                                            8
                         8
                   Hexadecimal to Decimal Conversion
                 You can convert a hexadecimal number into decimal number by multiplying each digit of the

                 number with the increasing powers of 16 starting from right-hand side. For example,
                 Example 1: Convert (3B)  into decimal.                Example 2: Convert (3A4)  into decimal.            11
                                          16
                                                                                                  16
                                      1
                     3B       = 3 × 16  + 11 × 16                      (3A4)   = 3 × 16² +10 × 16¹ + 4 × 16 0
                                                0
                        16
                                                                             16
                              = 48 + 11                                        = 768 + 160 + 4
                     (3B)     = (59)                                   (3A4)   = (932) 10
                                                                             16
                                    10
                         16
                    Operations on Binary Numbers
                 Similar to mathematics, a computer system can perform different operations on binary

                 numbers like addition, subtraction, multiplication, and division.

                  Binary Addition

                 Binary addition is similar to the addition of decimal numbers. When the value of addition
                 exceeds the value 1, say 10 or 11, then 1 is carried over to the left of the current position.

                 The rules for adding two binary digits are given below:

                       X             Y                X + Y
                       0             0               0 + 0 = 0                    1    1  1  1  1   _____  Carry bits
                       0             1               0 + 1 = 1                    1    0  1  1  1  1

                       1             0               1 + 0 = 1                +        1  0  1  1  1
                       1             1          1 + 1 = 10 (carry 1)          1  0     0  0  1  1  0


                 For example, let us add the binary numbers (101111)  and (10111) .
                                                                                       2
                                                                         2
                  Binary Subtraction

                 In binary subtraction, binary number of lower value is subtracted from the binary number
                 of  higher  value.  The  following  table  explains  the  subtraction  of  digit  Y  from  digit  X.
   8   9   10   11   12   13   14   15   16   17   18