Sunday, 7 September 2014

Attendance on 08-09-2014 (CSE-B)

CSE-B Attendance on 08-09-2014

Total Strength = 60 members (561 to 5C0)
Today Absentees = 61,65,74,75,78,79,80,81,82,84,89,92,95,96,A2,A3,A4,A5,A8,A9,B2,B4,B8,B9
Today total absentees = 24 members.

Today topics :
Introduction - Number systems - Number systems Conversion -  Binary to decimal number conversion


Number System Conversion - Binary to any base (Radix) conversion:

NUMBER SYSTEMS CONVERSION:

Binary to any base (Radix) conversion:

1.      Binary to decimal number conversion
2.      Binary to Octal number conversion
3.      Binary to Hexadecimal number conversion

Octal to any base (Radix) conversion:

1.      Octal to decimal number conversion
2.      Octal to binary number conversion
3.      Octal to Hexadecimal number conversion

Decimal to any base (Radix) conversion:

1.      Decimal to binary number conversion
2.      Decimal to Octal number conversion
3.      Decimal to Hexadecimal conversion

Hexa decimal to any base (Radix) conversion:

                       1.   Hexadecimal to binary number conversion
                       2.      Hexadecimal to Octal number conversion
                       3.      Hexadecimal to decimal number conversion


 Binary to any base (Radix) conversion:

1.      Binary to decimal number conversion                 * * * * * * * * * * * * * * * * * * * * *

Ex(1): Convert  (11111)2 to decimal
Sol:  The equivalent decimal number is
                  = 1x24 + 1x23 + 1x22 + 1x21 + 1x20
                  = 16+8+4+2+1             = (31)10
Ex(2): Convert decimal equivalent of the number 10101
Sol:  The equivalent decimal number is
=  1x24 + 0x23 + 1x22 + 0x21 + 1x20
                  = 16+4+1
                  = (21)10
Ex(3): Find the decimal equivalent of the binary number (110101)
Sol:  The equivalent decimal number is
                  = 1x25 +1x24 + 0x23 + 1x22 + 0x21 + 1x20
                                    =32+16+4+1
                  = (53)10
Ex(4):  Convert (101101)2 to decimal
Sol:   The equivalent decimal number is
                  =1x25 + 0x24 + 1x23 + 1x22 + 0x21 + 1x20
                                    =32+8+4+1  = (45)10
Ex(5): Determine the decimal number of the following binary number
             (101101.10101)
Sol:      The equivalent Decimal number is
             = 1x25+0x24+1x23+1x22+0x21+1x20. 1x2-1+0x2-2+1x2-3+0x2-4+1x2-5
             = 32 + 8 +4 +1 + (1/2) + (1/8) + (1/32)
             = (45.65625)10
 Ex(6): Convert decimal equivalent of the number (0.1011)
         Sol:      The equivalent Decimal number is
                    = 1x2-1+0x2-2+1x2-3+1x2-3+1x2-4
                    = (1/2) + 0 + (1/8) + (1/16)
                    = (0.6875)10                  
      Ex (7): convert 1101110.011 to decimal
       Sol: 
                =1x26  + 1x2+ 0x24 + 1x23 + 1x22 + 1x21 +0x20 .0x2-1 + 1x2-2 + 1x2-3
                = 64+32+0+8+4+2+0.0+1/4+1/8
                = (110.375)10
       Ex (8): (1001.0101)2  to decimal form
       Sol:  
                       = 1x23 + 0x2+ 0x21 + 1x20 .0x2-1 + 1x2-2 + 0x2-3 + 0x2-4
                      =    8+0+0+1.0+1/4+0+1/16
              = (9.3125)10

Number systems .......Class on 08-09-2014 (CSE-B)


NUMBER SYSTEMS:
In general, in any number system there is an ordered set of symbols known as digitals with rules defined for performing arithmetic operations like addition, multiplication, etc. A collection of these digits makes a number which in general has two parts. They are integer and fractional, set apart by a radix point (.), that is


Where    N= a number
                 b= radix or base of the number system
                 n= number of digits in integer portion
                m= number of digits in fractional portion
          dn-1= most significant digit (msd)
      d-m= least significant digit (lsd)

The digits in a number are placed side by side and each position in the number is assigned a weight or index of importance by some predesigned rule.

As a computer programmer or an IT professional, you should understand the following number systems, which are frequently used in computers.

Classification of Number systems:
The Number systems is mainly classified into four types:
1.      1. Binary       2. Octal         3. Decimal       and   4. Hexadecimal.



Binary Number System
Characteristics ->
·         Uses two digits, 0 and 1.
·         Also called base2 number system.
·         Each position in a binary number represents a 0 power of the base (2). Example, 20.
·         Last position in a binary number represents a x power of the base (2). Example, 2x where x represents the last position - 1.
EXAMPLE:
Binary Number: 101012

Octal Number System

Characteristics
·         Uses eight digits: 0, 1, 2, 3, 4, 5, 6, 7.
·         Also called base 8 number system.
·         Each position in a octal number represents a 0 power of the base (8). Example, 80.
·         Last position in a octal number represents a x power of the base (8). Example, 8x where x represents the last position - 1.

EXAMPLE

Octal Number: 125708


Decimal Number System

The number system that we use in our day-to-day life is the decimal number system. Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the successive positions to the left of the decimal point represent units, tens, hundreds, thousands and so on.

Hexadecimal number system
The Hexadecimal number system is a positional-weighted system.
 The base or radix of this number system is 16. It has 16 independent variables, they are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E and F. Its base is 16.
 The hexadecimal system is mainly useful for human communications with computers.
EXAMPLE:   Hexadecimal Number: 5709.ACD16

Binary Number & Corresponding decimal, octal & hexa decimal numbers:
(i)                 2- bit binary number(2n):
2n = 22=4              So, we have 4 combinations
Binary number
Decimal number
Hexadecimal number
octal
0 0
0
0
0
0 1
1
1
1
1 0
2
2
2
1 1
3
3
3

(i)                 3- bit binary number(2n):
2n=23=8               So, we have 8 combinations.
Binary number
Decimal number
Hexadecimal number
octal
000
0
0
0
001
1
1
1
010
2
2
2
011
3
3
3
100
4
4
4
101
5
5
5
110
6
6
6
111
7
7
7


(i)                 4- bit binary number(2n):
2n = 24=16       So, we have 16 combinations.
Binary number
Decimal number
Hexadecimal number
octal
0000
0
0
0
0001
1
1
1
0010
2
2
2
0011
3
3
3
0100
4
4
4
0101
5
5
5
0110
6
6
6
0111
7
7
7
1000
8
8
10
1001
9
9
11
1010
10
A
12
1011
11
B
13
1100
12
C
14
1101
13
D
15
1110
14
E
16
1111
15
F
17