7th class lesson no.1. Computer Number System Binary, Octal, Decimal, Hexadecimal

7th class lesson no.1. Number System
Numbers in computer are of different types are as:-
  1. Binary ()2
  2. Octal ()8
  3. Decimal ()10
  4. Hexadecimal ()16

Now we have to make table

     Binary ()2        Octal ()8          Decimal ()10      Hexadecimal ()16
      0               0                0             0       10=A
      1               1                1             1       11=B
       -               2                2             2       12=C
       -               3                3             3       13=D 
       -               4                4             4       14=E
       -               5                5             5       15=F
       -               6                6             6
       -               7                7             7
       -               -                 8             8
       -               -                 9             9

 These are numbers in computer system as shown in tabular form
Number Conversion:-
  • ()2----( ()8 Binary to Octal
  • ()2----( ()10 Binary to Decimal
  • ()2----( ()16 Binary to Hexadecimal
Number Conversion:-
  • ()8----( ()2 Octal to Binary
  • ()8----( ()10 Octal to Decimal
  • ()8----( ()16 Octal to Hexadecimal
Number Conversion:-
  • ()10----( ()2            Decimal to Binary
  • ()10----( ()8            Decimal to Octal
  • ()10----( ()16          Decimal to Hexadecimal  
Number Conversion:-
  • ()16----( ()2 Hexadecimal to Binary
  • ()16----( ()8            Hexadecimal to Octal
  • ()16----( ()10 Hexadecimal to Decimal
A. Conversion of Binary to Octal and.              B. Conversion of Octal to Binary                                                   Binary is: 2.                                                           Octal is:   8
Now question is that what should be the power of 2 to get 8?                                                    Answer is 2^3 =8    or     (2x2x2=8)
Now let’s make the table for Binary and Octal Numbers
      S.No.           8/2=4        4/2=2         2/2=1
        0.                   0                0                0
        1.                   0                0                1
        2.                   0                1                0
        3.                   0                1                1
        4.                   1                0                0
        5.                   1                0                1
        6.                   1                1                0
        7.                   1                1                1

To convert from Octal to Binary we should have make pair of three, three digits as you can see in the table given above. Now we are going solve some examples by making three, three pairs as given below. You can see in Qno.1. Octal is given as (761)8 convert into ( )2, we can write it as 7, 6, 1 we can say these are serial numbers and choose their values as given in the table above 7=111, 6=110, 1=001 so we can write it as 761= (111110001)2.

Q.No.1. Convert Octal (761)8 into Binary ()2?                                   Ans: -     (761)8 = ()2; = (111 110 001)2

Q.No.2. Convert Binary (010011)2 into Octal ()8?                             Ans: -     (010011)2 = (23)8

Q.No.3. Convert Binary (10.11)2 into Octal ()8?                                  Ans: -     (10.11)2   = (010.110)2   = (2.6) 8

C. Conversion of Binary into Hexadecimal.    D. Conversion of Hexadecimal into Binary.
                            Binary = 2                                                        Hexadecimal = 16                          Q. What should be the power of 2 to get 16?            Answer is 2^4=16, or (2x2x2x2=16)
Now let’s make the table for Binary and Hexadecimal Numbers
   S.No.    16/2=8      8/2=4      4/2=2      2/2=1
      0.            0               0               0             0
      1.            0               0               0             1
      2.            0               0               1             0
      3.            0               0               1             1
      4.            0               1               0             0
      5.            0               1               0             1
      6.            0               1               1             0
      7.            0               1               1             1
      8.            1               0               0             0
      9.            1               0               0             1      
   10=A.        1               0               1             0
   11=B.        1               0               1             1
   12=C.        1               1               0             0
   13=D.        1               1               0             1
   14=E.        1               1               1              0
   15=F.        1               1               1              1



Comments

Dear Guruji