+ All Categories
Home > Documents > MELJUN CORTES's - Number System Lecture

MELJUN CORTES's - Number System Lecture

Date post: 29-May-2018
Category:
Upload: meljun-cortes-mbampa
View: 220 times
Download: 0 times
Share this document with a friend

of 33

Transcript
  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    1/33

    Number Systems (Class XI)

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    2/33

    2

    Why Binary?

    Early computer design was decimal

    Mark I and ENIAC

    John von Neumann proposed binary data

    processing (1945) Simplified computer design

    Used for both instructions and data

    Natural relationsh

    ip betweenon/off switches and

    calculation using Boolean logic

    01

    NoYes

    FalseTrue

    OffOn

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    3/33

    Number Systems 2-3

    Counting and Arithmetic

    Decimal or base 10 number system Origin: counting on the fingers

    Digit from the Latin word digitus meaning finger

    Base: the number of different digits includingzero in the number system Example: Base 10 has 10 digits, 0 through 9

    Binaryorbase 2

    Bit(binary digit): 2 digits, 0 and 1

    Octalorbase 8: 8 digits, 0 through 7 Hexadecimal or base 16:

    16 digits, 0 through F Examples: 1010 = A16; 1110 = B16

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    4/33

    Number Systems 2-4

    Keeping Track of the Bits

    Bits commonly stored and manipulated

    in groups

    8 bits = 1 byte

    4 bytes = 1 word (in many systems)

    Number of bits used in calculations

    Affects accuracy of results

    Limits size of numbers manipulated by the

    computer

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    5/33

    Number Systems 2-5

    Numbers: Physical Representation

    Different numerals,same number of oranges Cave dweller: IIIII

    Roman: V

    Arabic: 5

    Different bases, samenumber of oranges

    510 1012

    123

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    6/33

    Number Systems 2-6

    Number System

    Roman: position independent

    Modern: based on positional notation (placevalue)

    Decimal system: system ofpositional notationbased on powers of 10.

    Binary system: system ofpositional notationbased powers of 2

    Octal system: system ofpositional notation based

    on powers of 8 Hexadecimal system: system ofpositional

    notation based powers of 16

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    7/33

    Number Systems 2-7

    Positional Notation: Base 10

    Sum

    Evaluate

    Value

    Place

    340

    3 x14 x 10

    110

    100101

    1s place10s place

    43 = 4 x 101 + 3 x 100

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    8/33

    Number Systems 2-8

    Positional Notation: Base 10

    500

    5 x 100

    100

    102

    Sum

    Evaluate

    Value

    Place

    720

    7 x12 x 10

    110

    100101

    1s place10s place

    527 = 5 x 102 +2 x 101+ 7 x 100

    100s place

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    9/33

    Number Systems 2-9

    Positional Notation: Octal

    6248 = 40410

    Sum for

    Base 10

    Evaluate

    Value

    Place

    4 x 12 x 86 x 64

    416384

    808182

    1864

    64s place 8s place 1s place

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    10/33

    Number Systems 2-10

    Positional Notation:Hexadecimal

    6,70416 = 26,37210

    4 x 10 x 167 x 2566 x

    4,096

    Evaluate

    401,79224,576Sum for

    Base 10

    160161162163Place

    1162564,096Value

    4,096s place 256s place 1s place16s place

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    11/33

    Number Systems 2-11

    Positional Notation: Binary

    Sum forBase 10

    Evaluate

    Value

    Place

    0 x 11 x 21 x 40 x 81 x160 x 321 x 641 x 128

    024016064128

    1248163264128

    2021222324252627

    1101 01102 = 21410

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    12/33

    Number Systems 2-12

    Estimating Magnitude: Binary

    110101102 = 21410

    110101102 > 19210(128 +64 + additional bits to the right)

    Sum for

    Base 10

    Evaluate

    Value

    Place

    0 x 11 x 21 x 40 x 81 x160 x 321 x 641 x 128

    024016064128

    1248163264128

    2021222324252627

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    13/33

    Number Systems 2-13

    Range of Possible Numbers

    R = BK where R = range

    B = base

    K = number of digits

    Example #1: Base 10, 2 digits R = 102 = 100 different numbers (099)

    Example #2: Base 2, 16 digits

    R = 216= 65,536 or 64K 16-bit PC can store 65,536 different number

    values

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    14/33

    Number Systems 2-14

    Decimal Range forBit Widths

    38+

    19+

    9+

    6

    4+

    3

    2+

    1+

    0+

    Digits

    Approx. 2.6 x 1038128

    Approx. 1.6 x 101964

    4,294,967,296 (4G)32

    1,048,576 (1M)20

    65,536 (64K)16

    1,024 (1K)10

    2568

    16 (0 to 15)4

    2 (0 and 1)1

    RangeBits

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    15/33

    Number Systems 2-15

    Base or Radix

    Base:

    The number of different symbols required to

    represent any given number

    The largerthe base, the more numerals arerequired

    Base 10: 0,1, 2,3,4,5,6,7,8,9

    Base 2: 0,1

    Base 8: 0,1,2, 3,4,5,6,7

    Base 16: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    16/33

    Number Systems 2-16

    Number of Symbolsvs. Number ofDigits

    For a given number, the largerthe base

    the more symbols required

    but the fewerdigits needed

    Example #1:

    6516 10110 1458 110 01012

    Example #2:

    11C16 28410 4348 1 0001 11002

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    17/33

    Number Systems 2-17

    Counting in Base 2

    Decimal

    Number

    EquivalentBinary

    Number

    101 x 211 x 231010

    91 x 201 x 231001

    81 x 231000

    71 x 201 x 211 x 22111

    61 x 211 x 22110

    51 x 201 x 22101

    41 x 22100

    31 x 201 x 2111

    20 x 201 x 2110

    11 x 201

    00 x 200

    1s (20)2s (21)4s (22)8s (23)

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    18/33

    Number Systems 2-18

    Addition

    Largest Single DigitProblemBase

    1

    +0

    6

    +9

    6

    +1

    6

    +3

    1Binary

    FHexadecimal

    7Octal

    9Decimal

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    19/33

    Number Systems 2-19

    Addition

    AnswerCarryProblemBase

    Carry the 2

    Carry the 16

    Carry the 8

    Carry the 10

    101

    +1Binary

    106

    +AHexadecimal

    106

    +2Octal

    106

    +4Decimal

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    20/33

    Number Systems 2-20

    Binary Arithmetic

    11000001

    01101+1011011

    11111

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    21/33

    Number Systems 2-21

    Converting from Base 10

    256

    64

    4

    2

    1164,09665,53616

    185124,09632,7688

    1281632641282562

    01345678Power

    Base

    Powers Table

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    22/33

    Number Systems 2-22

    From Base 10 to Base 2

    0

    1

    0

    64

    6

    42/32

    = 1

    Integer

    Remainder

    10101

    24816322

    12345Power

    Base

    4210 = 1010102

    10/16

    = 0

    10

    10/8

    = 1

    2

    2/4

    = 0

    2

    2/2

    = 1

    0

    0/1

    = 0

    010

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    23/33

    Number Systems 2-23

    From Base 10 to Base 2

    Most significant bit12 )( 022 )

    42Base 10

    101010Base 2

    ( 152 )

    ( 0102 )

    ( 1212 )

    ( 0 Least significant bit422 )

    Remainder

    Quotient

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    24/33

    Number Systems 2-24

    From Base 10 to Base 16

    5,73510 = 166716

    103 96

    = 7

    1,639 1,536

    = 103

    5,735 - 4,096

    = 1,639

    Remainder

    7103 /16

    = 6

    1,639 / 256

    = 6

    5,735 /4,096

    = 1

    Integer

    7661

    1162564,09665,53616

    01234Power

    Base

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    25/33

    Number Systems 2-25

    From Base 10 to Base 16

    5,735Base 10

    1667Base 16

    016 )

    ( 1 Most significant bit116 )

    ( 62216 )

    ( 635816 )

    ( 7 Least significant bit5,73516 )Quotient

    Remainder

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    26/33

    Number Systems2-26

    From Base 10 to Base 16

    8,039Base 10

    1F67Base 16

    016 )

    ( 1 Most significant bit116 )

    ( 153116 )

    ( 650216 )

    ( 7 Least significant bit8,03916 )Quotient

    Remainder

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    27/33

    Number Systems2-27

    From Base 8 to Base 10

    3,584

    x 7

    512

    83

    = 3,76310

    348128Sum for

    Base 10

    x 3x 6x 2

    1864

    808182Power

    72638

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    28/33

    Number Systems 2-28

    From Base 8 to Base 10

    = 3,7631072638

    + 3 =

    + 6=

    + 2=

    3,7633760

    464

    58

    x 8

    470

    x 8

    56

    7

    x 8

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    29/33

    Number Systems 2-29

    From Base 16 to Base 2

    The nibble approach

    Hex easier to read and write than binary

    Why hexadecimal? Modern computer operating systems and networks

    present variety of troubleshooting data in hex format

    0111011011110001Base 2

    76F1Base 16

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    30/33

    Number Systems 2-30

    Fractions

    Number point orradix point

    Decimal point in base 10

    Binary point in base 2

    No exact relationship between fractional

    numbers in different number bases

    Exact conversion may be impossible

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    31/33

    Number Systems 2-31

    Decimal Fractions

    Move the number point one place to the right

    Effect: multiplies the number by the base number

    Example: 139.010 139010

    Move the number point one place to the left Effect: divides the number by the base number

    Example: 139.010 13.910

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    32/33

    Number Systems 2-32

    Fractions: Base 10 and Base 2

    .008

    8 x 1/1000

    1/1000

    10-3

    .2

    2 x 1/10

    1/10

    10-1

    Sum

    Evaluate

    Value

    Place

    .0009.05

    9 x1/10005 x 1/100

    1/100001/100

    10-410-2

    .1010112= 0.67187510

    0 x 1/16

    1/16

    2-4

    0.03125

    1 x 1/32

    1/32

    2-5

    0.0156250.125.5Sum

    1 x 1/641x 1/80 x 1/41 x 1/2Evaluate

    1/641/81/41/2Value

    2-62-32-22-1Place

    .258910

  • 8/8/2019 MELJUN CORTES's - Number System Lecture

    33/33

    Number Systems 2-33

    Mixed Number Conversion

    Integer and fraction parts must be

    converted separately

    Radix point: fixed reference for the

    conversion

    Digit to the left is a unit digit in every base

    B0 is always 1 regardless of the base


Recommended