1.0 numbering system - lecturer

Upload: hizami-li

Post on 04-Apr-2018

246 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 1.0 Numbering System - Lecturer

    1/61

    NUMBERING SYSTEM

  • 7/30/2019 1.0 Numbering System - Lecturer

    2/61

    NUMBERING SYSTEM

    Decimal

    Binary

    Octal Changing Numbering System Process

    Basic Operation

  • 7/30/2019 1.0 Numbering System - Lecturer

    3/61

    DECIMAL

    A decimal number (based on the number 10)

    contains a decimal point.

    To understand decimal numbers you must first

    know about place value.

    When we write numbers, the position (or

    place) of each number is important.

  • 7/30/2019 1.0 Numbering System - Lecturer

    4/61

    In the number 327:

    o The 7 is in the Units position, meaning just 7 (or 7 1s)

    o The 2 is in the Tens position meaning 2 tens (or twenty)

    o The 3 is in the Hundreds position meaning 4 hundreds

  • 7/30/2019 1.0 Numbering System - Lecturer

    5/61

    As we move left, each position is 10 times bigger!

    From Units, to Tens, to Hundreds, to Thousands,

    to Ten-Thousands, to Hundred-Thousands, to

    Millions!

    As we move right, each position is 10 timessmaller.

    From Millions, to Hundred-Thousands, to Ten-

    Thousands, to Thousands, to Hundreds, to Tens,to Units.

  • 7/30/2019 1.0 Numbering System - Lecturer

    6/61

    But what if we continue past Units?

    What is 10 times smaller than Units?

    But we must first write a decimal point, so we know exactly

    where the Units position is.

    are!(Tenths)th10

    1

  • 7/30/2019 1.0 Numbering System - Lecturer

    7/61

    The decimal point is the most important part of a decimal

    number. It is exactly to the right of the Units position.Without it, we would be lost and not know what each position

    meant.

    Now we can continue with smaller and smaller values, from

    tenths, to hundredths, and so on, like in this example:

  • 7/30/2019 1.0 Numbering System - Lecturer

    8/61

    So, our decimal system lets us write numbers

    as large or as small as we want, using the

    decimal point.

    Numbers can be placed to the left or right of a

    decimal point, to indicate values greater than

    one or less than one.

  • 7/30/2019 1.0 Numbering System - Lecturer

    9/61

    17.591

    The number to the left of the decimal point isa whole number (17 for example).

    As we move further left, every number place

    gets 10 times bigger. The first digit on the right means tenths

    (1/10).

    As we move further right, every number placegets 10 times smaller (one tenth as big).

  • 7/30/2019 1.0 Numbering System - Lecturer

    10/61

    The word decimal really means based on

    10.

    From Latin decima: a tenth part.

  • 7/30/2019 1.0 Numbering System - Lecturer

    11/61

    A decimal fraction is a fraction where the

    denominator (the bottom number) is a number such

    as 10, 100, 1000, etc (in other words a power of ten).

    10

    23:thislikelookwould"2.3"So

    100

    1376:thislikelookwould"13.76"So

  • 7/30/2019 1.0 Numbering System - Lecturer

    12/61

    Or, you could think of a decimal number as a

    whole number plus a decimal fraction.

    10

    3and2:thislikelookwould"2.3"So

    100

    76and13:thislikelookwould"13.76"So

  • 7/30/2019 1.0 Numbering System - Lecturer

    13/61

    BINARY

    A binary number is made up of only 0s and 1s.

    110100Example of a binary number

    There is no 2, 3, 4, 5, 6, 7, 8 or 9 in binary!

  • 7/30/2019 1.0 Numbering System - Lecturer

    14/61

    How do we count using binary?

    Binary

    1 We start 0

    2 Then 1

    ??? But then there is no symbol for 2. What do we do?

  • 7/30/2019 1.0 Numbering System - Lecturer

    15/61

    Well, how do we count in decimal?

    0 Start at 0

    Count 1, 2, 3, 4, 5, 6, 7, 8 and then

    9 This is the last digit in decimal

    10 So we start back at 0 again, but add 1 on the left

  • 7/30/2019 1.0 Numbering System - Lecturer

    16/61

    The same thing is done in binary:

    Binary

    0 Start at 0

    1 Then 1

    10 Now start back at 0 again, but add 1 on the left

    11 1 more

    ??? But now what?

  • 7/30/2019 1.0 Numbering System - Lecturer

    17/61

    What happens in decimal?

    99 When we run out of digits,

    100 We start back at 0 again, but add 1 on the left

  • 7/30/2019 1.0 Numbering System - Lecturer

    18/61

    Binary

    0 Start at 0 1 Then 1

    10 Start back at 0 again, but add 1 on the left

    11

    100 1is added to the next position on the left

    101

    110

    111

    1000 Start back at 0 again and add 1 on the left

    1001 And so on!

  • 7/30/2019 1.0 Numbering System - Lecturer

    19/61

    Decimal VS Binary

  • 7/30/2019 1.0 Numbering System - Lecturer

    20/61

    In the decimal system there are the Units, Tens,

    Hundreds, etc. In binary, there are Units, Twos, Fours, etc, like this:

  • 7/30/2019 1.0 Numbering System - Lecturer

    21/61

    The word binarycomes form bi- meaning two. Wesee bi- in words such as bicycle (two wheels) or

    binocular (two eyes).

    When you say a binary number, pronounce each digit(example, the binary number 101 is spoken as one

    zero one, or sometimes one-oh-one). This waypeople dont get confused with the decimal number.

    A single binary digit (like 0 or 1) is called a bit. Forexample 11010 is five bits long. The word bit is madeup from the words binary digit.

  • 7/30/2019 1.0 Numbering System - Lecturer

    22/61

    To show that a number is a binary number,follow it with a little 2 like this:

    This way people wont think it is the decimal

    number 101 (one hundred and one).

    2101

  • 7/30/2019 1.0 Numbering System - Lecturer

    23/61

    Value of a Number in Binary

    The value of the n-th digit in a number in base two is

    equal to .21n

    First

    Second

    Third

    Fourth

    Fifth

    Sixth

    n-th

    02

    12

    22

    32

    42

    52

    12

    n

  • 7/30/2019 1.0 Numbering System - Lecturer

    24/61

    State the value of the underlined digit in each of the

    following numbers in

    a)

    b)

    c)

    21011100

    4212

    20010111621

    4

    210101016421

    6

  • 7/30/2019 1.0 Numbering System - Lecturer

    25/61

    Binary in Expanded Notation

    A number in base two can be written in expanded

    notation as the sum of the product of the digit and

    its digit value.

  • 7/30/2019 1.0 Numbering System - Lecturer

    26/61

    Example 1:

    notation?expandedin1111isWhat 2

    aswrittenbecan11112

    0123 21212121

  • 7/30/2019 1.0 Numbering System - Lecturer

    27/61

    Example 2:

    notation?expandedin1001isWhat 2

    aswrittenbecan10012

    0123 21202021

  • 7/30/2019 1.0 Numbering System - Lecturer

    28/61

    Example 3:

    notation?expandedin1.1isWhat 2

    aswrittenbecan1.12

    1

    0

    2

    1121

  • 7/30/2019 1.0 Numbering System - Lecturer

    29/61

    Example 4:

    notation?expandedin10.11isWhat 2

    aswrittenbecan10.112

    21

    01

    2

    112

    112021

  • 7/30/2019 1.0 Numbering System - Lecturer

    30/61

    Example 5:

    notation?expandedin110.01isWhat 2

    aswrittenbecan110.012

    21

    012

    2

    112

    10202121

  • 7/30/2019 1.0 Numbering System - Lecturer

    31/61

    OCTAL

    The octal numeral system, or oct for short, is

    the base-8 number system, and uses the digits

    0 to 7.

    So, what if we had eight fingers, or for some

    other reason, we decided to start over every

    eighth number instead of every tenth?

  • 7/30/2019 1.0 Numbering System - Lecturer

    32/61

    In this system, there are eight symbols to workwith:

    0 1 2 3 4 5 6 7

    We dont need an 8 or a 9 at all: out of justthose eight symbols above, we are going to

    represent every possible number!

  • 7/30/2019 1.0 Numbering System - Lecturer

    33/61

    So, we start by listing all the symbols after the

    zero.1

    2

    34

    5

    67

  • 7/30/2019 1.0 Numbering System - Lecturer

    34/61

    When we get to that point, were out of symbols. So

    what do we do? We go all the way down to zero, and add a one to our

    left: we write one-zero (10).

    It means the number that comes after seven, or what

    we normally call eight. When we write one-oh (10) in base eight, we dont

    mean ten, we mean the number eight.

    The numbers in base eight look just like our normal

    numbers (except that they never use the symbols 8 or9), but they dont mean the same things.

  • 7/30/2019 1.0 Numbering System - Lecturer

    35/61

    Now we start counting on the right again: one-

    one, one-two, one-three, and so on (11, 12,

    13, ).

    Soon we hit one-seven (17) and we run out of

    digits again, so we have to increment on the

    left: two-zero, or 20. Every eighth number, we

    start over again.

  • 7/30/2019 1.0 Numbering System - Lecturer

    36/61

    This system works great until we get to 77,

    and then we cant increment the left-handed

    digit any more. So we move to the left again

    and write one-zero-one (100).

    Its important to remember again that this

    doesnt mean the same thing we normally call

    one hundred so its best not to call it that:

    call it one-zero-one.

  • 7/30/2019 1.0 Numbering System - Lecturer

    37/61

    Value of a Number in Octal

    The value of the n-th digit in a number in base eight

    is equal to .81n

    First

    Second

    Third

    Fourth

    Fifth

    Sixth

    n-th

    08

    18

    28

    38

    48

    58

    18

    n

  • 7/30/2019 1.0 Numbering System - Lecturer

    38/61

    State the value of the underlined digit in each of the

    following numbers in

    a)

    b)

    c)

    83214576481

    2

    875321221024512282

    3

    8576332122884096383

    4

  • 7/30/2019 1.0 Numbering System - Lecturer

    39/61

    Octal in Expanded Notation

    A number in base eight can be written in expanded

    notation as the sum of the product of the digit and

    its digit value.

  • 7/30/2019 1.0 Numbering System - Lecturer

    40/61

    Example 1:

    notation?expandedin261isWhat 8

    aswrittenbecan2618

    012 818682

  • 7/30/2019 1.0 Numbering System - Lecturer

    41/61

    Example 2:

    notation?expandedin4271isWhat 8

    aswrittenbecan42718

    0123 21878284

  • 7/30/2019 1.0 Numbering System - Lecturer

    42/61

    Example 3:

    notation?expandedin5.2isWhat 8

    aswrittenbecan5.28

    1

    0

    81285

  • 7/30/2019 1.0 Numbering System - Lecturer

    43/61

    Example 4:

    notation?expandedin3.21isWhat 8

    aswrittenbecan3.218

    21

    0

    811

    81223

  • 7/30/2019 1.0 Numbering System - Lecturer

    44/61

    Example 5:

    notation?expandedin45.17isWhat 8

    aswrittenbecan45.178

    21

    01

    817

    8118584

  • 7/30/2019 1.0 Numbering System - Lecturer

    45/61

    What does 1235 base eight really mean?

    So we can say 1235 base eight equals 669

    base ten.

    669

    51216428315

    81828385

    1235

    3210

    8

  • 7/30/2019 1.0 Numbering System - Lecturer

    46/61

    CHANGING NUMBERING

    SYSTEM PROCESS

    Converting to Decimal (base 10)

    Convert from Decimal (base 10)

  • 7/30/2019 1.0 Numbering System - Lecturer

    47/61

    Converting to Decimal

    Convert Binary into Decimal

    Convert Octal into Decimal

  • 7/30/2019 1.0 Numbering System - Lecturer

    48/61

    Convert Binary into Decimal

    decimalto1011Convert 2

    10

    0123

    2

    11

    1208

    212120211011

  • 7/30/2019 1.0 Numbering System - Lecturer

    49/61

    decimalto1111Convert 2

    10

    0123

    2

    15

    1248

    212121211111

  • 7/30/2019 1.0 Numbering System - Lecturer

    50/61

    Convert Octal into Decimal

    decimalto235Convert 8

    10

    012

    8

    157

    524128

    858382235

  • 7/30/2019 1.0 Numbering System - Lecturer

    51/61

    decimalto55Convert 8

    10

    01

    8

    45

    540

    858555

  • 7/30/2019 1.0 Numbering System - Lecturer

    52/61

    Convert from Decimal

    Convert Decimal into Binary

    Convert Decimal into Octal

  • 7/30/2019 1.0 Numbering System - Lecturer

    53/61

    Convert Decimal into Binary

    binaryinto5Convert 10

    1R

    0

    12

    0R

    1

    22

    1R

    2

    52

    1) Divide 2 into the number you are trying

    to convert.

    2) Write the quotient (the answer) with a

    remainder.3) Repeat this division process using the

    whole number from the previous

    quotient.

    4) Continue repeating this division until the

    number in front of the remainder is only

    zero.5) The answer is the remainders read from

    the bottom up.

    210 1015

  • 7/30/2019 1.0 Numbering System - Lecturer

    54/61

    Convert Decimal into Binary

    binaryinto9Convert 10

    1R

    0

    12

    0R

    1

    22

    0R

    2

    42

    1R

    4

    92

    210 10019

  • 7/30/2019 1.0 Numbering System - Lecturer

    55/61

    Convert Decimal into Octal

    octalinto140Convert 10

    2R

    0

    28

    1R

    2

    178

    4R

    17

    1408

    1) Divide 8 into the number you are trying

    to convert.

    2) Write the quotient (the answer) with a

    remainder.3) Repeat this division process using the

    whole number from the previous

    quotient.

    4) Continue repeating this division until the

    number in front of the remainder is only

    zero.5) The answer is the remainders read from

    the bottom up.

    810 214140

  • 7/30/2019 1.0 Numbering System - Lecturer

    56/61

    Convert Decimal into Octal

    octalinto202Convert 10

    3R

    0

    38

    1R

    3

    258

    2R

    25

    2028

    810 312202

  • 7/30/2019 1.0 Numbering System - Lecturer

    57/61

    BASIC OPERATION

    Addition of two numbers in binary

    Subtraction of two numbers in binary

  • 7/30/2019 1.0 Numbering System - Lecturer

    58/61

    Addition of Two Number in Binary

    222 1011 i.

    ii.

    iii.

    222222 11110111

    222222 10010101111

  • 7/30/2019 1.0 Numbering System - Lecturer

    59/61

    22 11011110010

    Find the sum of

    i.

    ii.

    21001001

    22 10111100111 2111110

  • 7/30/2019 1.0 Numbering System - Lecturer

    60/61

    Subtraction of Two Number in Binary

    222 1110 i.

    ii.

    iii.

    222 10111

    222 111100

  • 7/30/2019 1.0 Numbering System - Lecturer

    61/61

    22 1011110110

    Calculate

    i.

    ii.

    2101011

    22 1110110001 2100011