Upcoming SlideShare
×

# MELJUN CORTES - Computer Errors

223 views

Published on

MELJUN CORTES - Computer Errors

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
223
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
3
0
Likes
0
Embeds 0
No embeds

No notes for slide

### MELJUN CORTES - Computer Errors

1. 1. Year 1 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 human carelessness CS113/0401/v1 Lesson 12 - 1
2. 2. Year 1 PARITY BIT CHECKExample :If ‘B’ is represented as 100 0010, we can use even parity conversion to produce a parity bitIF odd number of 1’s THEN parity bit 1ELSE parity bit 0ENDIF CS113/0401/v1 Lesson 12 - 2
3. 3. Year 1CHECK DIGIT PRINCIPLES♦ Select a “weight” for each digit in the 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 CS113/0401/v1 Lesson 12 - 3
4. 4. Year 1 CHECK DIGIT CALCULATIONExample for 831 405 - 8 x 7 = 56 3 x 6 = 18 1x5=5 4 x 4 = 16 0x3=0 5 x 2 = 10 Total = 105Divide by modulus (11)= 9 remainder 6Check digit is 11-6=5 ∴831 405 - 5 CS113/0401/v1 Lesson 12 - 4
5. 5. Year 1 NCC 1/94Question 8 c)i) Using mod 11 and weightings of 2, 3 and 4 for the units, tens and hundreds columns, append a check digit to 974. (2m)ii) Show how a transposition error occurring in the number 974 wold be detected. (2m) CS113/0401/v1 Lesson 12 - 5
6. 6. Year 1 AnswerI) 9 x 4 = 36 65 ÷ 11=5 r 10 [1] 7 x 3 = 21 11 - 10 = 1 4x2= 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 a transportation 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 CS113/0401/v1 Lesson 12 - 6
7. 7. Year 1 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 division is 0.1cm, then the reported reading may be 5.15cm and the inherent error is 0.05cm. CS113/0401/v1 Lesson 12 - 7
8. 8. Year 1 ERROR♦ 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 is stored as 0 1 0 1 0 1 0 0 Thus the error is brought in due to the limitation of computer CS113/0401/v1 Lesson 12 - 8
9. 9. Year 1ABSOLUTE AND RELATIVE ERROR (1)♦ 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 absolute error to the true value I.e. absolute error true value CS113/0401/v1 Lesson 12 - 9
10. 10. Year 1ABSOLUTE 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% ) CS113/0401/v1 Lesson 12 - 10
11. 11. Year 1 NCC 2/94Question 1(g)Two values are recorded as 8.7 and -4.3,both correct to 1D. What is the MAXIMUMABSOLUTE ERROR when they are addedtogether?(2m)Answer8.65 ≤ x ≤ 8.75-4.35 ≤ y - ≤ 4.254.3 ≤ x ≤ 4.5Recorded value is 4.4Hence maximum absolute error is 0.1.One mark for maximum individual error±0.05.One mark for correct answer. CS113/0401/v1 Lesson 12 - 11
12. 12. Year 1 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 the Error Propagation CS113/0401/v1 Lesson 12 - 12
13. 13. Year 1WHEN DO TRANSACTION ERRORS OCCUR?♦ When data is first recorded in a User Department♦ When this data is input to the computer or transcribed into machine readable formSINGLE TRANSPOSITION ERRORS 237426 1546 234726 1645 CS113/0401/v1 Lesson 12 - 13
14. 14. Year 1 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 CS113/0401/v1 Lesson 12 - 14
15. 15. Year 1 CONVERSION ERRORS♦ Decimal input 0.3♦ Binary equivalent 0.010011001♦ Equivalent in 6 bits 0.010011♦ Which is equivalent 0.296875 CS113/0401/v1 Lesson 12 - 15
16. 16. Year 1DEALING WITH ROUNDING ERRORS♦ Never truncate or round up all the time (round off instead)♦ Always used the maximum space available for sorting intermediate results CS113/0401/v1 Lesson 12 - 16
17. 17. Year 1ADDING IN DESCENDINGORDER OF MAGNITUDE0.154308 + 0.019276 = 0.173584 = 1.1740.174000 + 0.003574 = 0.177574 = 0.1780.178000 + 0.002807 = 0.180807 = 0.181Exact answer is 0.179965 CS113/0401/v1 Lesson 12 - 17
18. 18. Year 1ADDING IN ASCENDINGORDER 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 CS113/0401/v1 Lesson 12 - 18