meljun cortes errors rm104tr-12

Upload: meljun-cortes-mbampa

Post on 04-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    1/18

    Lesson 12 - 1

    Year 1

    CS113/0401/v1

    LESSON 12

    Errors

    Common Mistakes

    Lose track of the source

    documents Enter data wrongly

    Invalid datatype

    ( e.g. enter alphabets instead of

    numerical data ) Out of the valid data range

    ( e.g. enter 23322 while the

    actual data is 23223 )

    Transportation of characters( e.g. 000100101 is transmitted

    along a cable and on the way

    due to voltage surge, the data

    becomes 101001101

    Mistakes are due to humancarelessness

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    2/18

    Lesson 12 - 2

    Year 1

    CS113/0401/v1

    Example :

    If B is represented as 100 0010,

    we can use even parity

    conversion to produce a parity bit

    IF odd number of 1s THEN

    parity bit 1

    ELSE

    parity bit 0

    ENDIF

    PARITY BIT CHECK

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    3/18

    Lesson 12 - 3

    Year 1

    CS113/0401/v1

    CHECK DIGIT PRINCIPLES

    Select a weight for each digit inthe number

    Multiply each digit by its weight

    Sum the results

    Select and divide by a modulus

    The modulus less the remainder

    is the check digit

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    4/18

    Lesson 12 - 4

    Year 1

    CS113/0401/v1

    Example for 831 405 -8 x 7 = 56

    3 x 6 = 18

    1 x 5 = 5

    4 x 4 = 16

    0 x 3 = 0

    5 x 2 = 10

    Total = 105

    Divide by modulus (11)= 9 remainder 6

    Check digit is 11-6=5 831 405 - 5

    CHECK DIGIT

    CALCULATION

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    5/18

    Lesson 12 - 5

    Year 1

    CS113/0401/v1

    NCC 1/94

    Question 8 c)

    i) Using mod 11 and weightings of 2,

    3 and 4 for the units, tens and

    hundreds columns, append acheck digit to 974.

    (2m)

    ii) Show how a transposition erroroccurring in the number 974 wold

    be detected.

    (2m)

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    6/18

    Lesson 12 - 6

    Year 1

    CS113/0401/v1

    I) 9 x 4 = 36 65 11=5 r 10 [1]

    7 x 3 = 21 11 - 10 = 1

    4 x 2 = 8 9741 required answer

    65 [ 1 ]

    ii) Let error give to 9471. Follow through on

    candidates valid transportation error

    e.g. 4971 etc. [1] for recognizing what atransportation error is.

    9 x 4=36

    4 x 3=12 [1] for appropriate method.

    7 x 2=14

    1 x 1= 1

    63 Not exactly divisible by 11

    Error in data

    Answer

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    7/18

    Lesson 12 - 7

    Year 1

    CS113/0401/v1

    ERROR

    Inherent Error

    It is error that already exist by

    itself in the measurement scale.

    E.g. Ruler measurement

    If the length fall between 5.1cm

    and 5.2cm, the smallest divisionis 0.1cm, then the reported

    reading may be 5.15cm and the

    inherent error is 0.05cm.

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    8/18

    Lesson 12 - 8

    Year 1

    CS113/0401/v1

    Induced Error It is error which is brought in from

    outside due to external factors

    Example: In a fixed point 8-bit

    register in computer, the implied

    point to the right of 5 bits

    If a data 1010.01110 is to be

    stored, rounding or truncation is

    necessary.

    Rounding : The above data isstored as

    Thus the error is brought in dueto the limitation of computer

    0 1 0 1 0 1 0 0

    ERROR

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    9/18

    Lesson 12 - 9

    Year 1

    CS113/0401/v1

    Absolute Error is: Value used - True value

    The difference between the

    number represented and its true

    value (value as stored less true

    value)

    Relative Error is:

    The proportion of the absoluteerror to the true value I.e.

    absolute error

    true value

    ABSOLUTE AND RELATIVE

    ERROR (1)

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    10/18

    Lesson 12 - 10

    Year 1

    CS113/0401/v1

    ABSOLUTE AND RELATIVE

    ERROR (2)

    From a previous example: Absolute error is

    = Value used - True value

    0.296875 - 0.3

    = -0.003125

    Relative error is

    = Absolute error / True value

    -0.003125 / 0.3

    = -0.0104166 ( or -1.04166% )

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    11/18

    Lesson 12 - 11

    Year 1

    CS113/0401/v1

    NCC 2/94

    Question 1(g)

    Two values are recorded as 8.7 and -4.3,

    both correct to 1D. What is the MAXIMUMABSOLUTE ERROR when they are added

    together?

    (2m)

    Answer

    8.65 x 8.75

    -4.35 y - 4.25

    4.3 x 4.5

    Recorded value is 4.4

    Hence maximum absolute error is 0.1.

    One mark for maximum individual error

    0.05.

    One mark for correct answer.

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    12/18

    Lesson 12 - 12

    Year 1

    CS113/0401/v1

    ERROR PROPAGATION

    Inherent errors in data values,may produce further errors as

    they are operated on

    arithmetically

    These errors may be termed as

    Induced errors

    This spread of errors is called theError Propagation

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    13/18

    Lesson 12 - 13

    Year 1

    CS113/0401/v1

    When data is first recorded in a

    User Department When this data is input to the

    computer or transcribed into

    machine readable form

    SINGLE TRANSPOSITION

    ERRORS

    237426 1546

    234726 1645

    WHEN DO TRANSACTION

    ERRORS OCCUR?

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    14/18

    Lesson 12 - 14

    Year 1

    CS113/0401/v1

    TRUNCATION ERRORS

    Calculate: (a + b) / (c - d)

    Where:a = 3.62841 b = 5.38634

    c = 8.32174 d = 8.31079

    If actual values used:

    9.01475 / 0.01095 = 823.26484

    If values corrected to 3 decimals places:

    9.015 / 0.011 = 819.54545

    Notice that the resulting error after the

    division is much larger than the original

    rounding off

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    15/18

    Lesson 12 - 15

    Year 1

    CS113/0401/v1

    CONVERSION ERRORS

    Decimal input 0.3

    Binary equivalent 0.010011001

    Equivalent in 6 bits 0.010011

    Which is equivalent 0.296875

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    16/18

    Lesson 12 - 16

    Year 1

    CS113/0401/v1

    DEALING WITH ROUNDING

    ERRORS

    Never truncate or round up all thetime (round off instead)

    Always used the maximum space

    available for sorting intermediateresults

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    17/18

    Lesson 12 - 17

    Year 1

    CS113/0401/v1

    ADDING IN DESCENDING

    ORDER OF MAGNITUDE

    0.154308 + 0.019276 = 0.173584= 1.174

    0.174000 + 0.003574 = 0.177574

    = 0.178

    0.178000 + 0.002807 = 0.180807

    = 0.181

    Exact answer is 0.179965

  • 7/29/2019 MELJUN CORTES ERRORS Rm104tr-12

    18/18

    Lesson 12 - 18

    Year 1

    CS113/0401/v1

    ADDING IN ASCENDING

    ORDER OF MAGNITUDE

    0.002807 + 0.003574 = 0.006381= 0.00638

    0.006380 + 0.019276 = 0.025656

    = 0.0257

    0.025700 + 0.154308 = 0.180008

    = 0.180

    Exact answer is 0.179965

    Previous answer was 0.181